ScriptManager.RegisterStartupScript(this,this.GetType(),"Popup","alert('Welcome to NRsolution4u!');",true);
NRSolution4u Dot net Learning
Tuesday, September 29, 2026
Monday, September 28, 2026
C# MATHAMETICAL FUNCTION
using System;
class Program
{
static void Main()
{
double number = 25;
Console.WriteLine("Square Root = " + Math.Sqrt(number));
Console.WriteLine("Power = " + Math.Pow(5, 2));
Console.WriteLine("Absolute Value = " + Math.Abs(-25));
Console.WriteLine("Ceiling = " + Math.Ceiling(10.25));
Console.WriteLine("Floor = " + Math.Floor(10.75));
Console.WriteLine("Round = " + Math.Round(10.56));
Console.WriteLine("Maximum = " + Math.Max(20, 50));
Console.WriteLine("Minimum = " + Math.Min(20, 50));
}
}
Monday, September 21, 2026
Email programming with APP Password
EMAIL LIBRARY INCLUDE
using System.Net.Mail;
Send Button Code
{
MailMessage mailMessage = new MailMessage(); //set the Mail Property to,from,body
SmtpClient stp = new SmtpClient(); // set the credential
mailMessage.To.Add(txtemail.Text);
mailMessage.From = new MailAddress("YOUR EMAIL ID");
mailMessage.Subject = "OTP Verification - Demo Session Registration";
mailMessage.Body = @"
<html>
<head></head>
<body style='font-family:Arial, Helvetica, sans-serif; font-size:14px;'>
<p>Dear Student,</p>
<p>
Thank you for registering for the <b>Yoga Demo Session</b> with
<b>Globeyog</b>.
</p>
<p>
To complete your registration, please verify your email address using the
One-Time Password (OTP) below:
</p>
<p style='font-size:20px; color:#0066CC;'>
<b>Your OTP: " + n.ToString() + @"</b>
</p>
<p>
This OTP is valid for <b>10 minutes</b>.
Please do not share it with anyone.
</p>
<p>
If you did not request this registration, please ignore this email.
</p>
<p>
Thank you for choosing <b>Globeyog</b>.
We look forward to welcoming you to the Yoga Demo Session.
</p>
<br />
<p>
Regards,<br /><br />
<b>Team Globeyog</b><br />
<br />
</p>
</body>
</html>";
mailMessage.IsBodyHtml = true;
//smtpClient.Send(mailMessage);
stp.Host = "smtp.gmail.com"; // host is reprensenting mail server
stp.Credentials = new System.Net.NetworkCredential("youremailid@gmail.com", "APP PASSWORD");
stp.EnableSsl = true; //sucessful send message server security licences
// send your mail using send()
stp.Send(mailMessage);
}
Sunday, September 20, 2026
FIND DATE BETWEEN TWO DATE START AND END
DateTime startDate;
DateTime endDate;
bool isStartValid = DateTime.TryParseExact(
lblstartdate.Text,
"dd/MM/yyyy",
CultureInfo.InvariantCulture,
DateTimeStyles.None,
out startDate);
bool isEndValid = DateTime.TryParseExact(
lblenddate.Text,
"dd/MM/yyyy",
CultureInfo.InvariantCulture,
DateTimeStyles.None,
out endDate);
if (isStartValid && isEndValid)
{
DateTime currentDate = DateTime.Today;
if (currentDate >= startDate && currentDate <= endDate)
{
lnkEdit.Visible = true; // show offer button
}
else
{
lnkEdit.Visible = true; // hide offer button
}
}
Monday, September 14, 2026
Gridview Pagining
<asp:GridView ID="GridView1" runat="server"
Sunday, September 6, 2026
ADD MP4 VIDEO IN ASPX PAGE
<video autoplay loop muted width="100%" height="100%" src="pic/yoga.mp4">
x
Saturday, September 5, 2026
GRIDVIEW DISPLAY TEXT IN PARAGRAPH
<asp:TemplateField HeaderText="Message">
<ItemTemplate>
<div style=" width: 100%;
max-width: 900px;
font-size: 13px;
line-height: 1.7;
white-space: normal;
overflow-wrap: break-word;
word-wrap: break-word;
text-align: justify;">
<%# Eval("message") %>
</div>
</ItemTemplate>
</asp:TemplateField>
JAVA SCRIPT POPUP C#
ScriptManager.RegisterStartupScript(this,this.GetType(),"Popup","alert('Welcome to NRsolution4u!');",true);
-
Database Create Student : roll , name , city , cost Fix 6 Value in Database Record ====================================================...
-
Store Procedure CREATE PROCEDURE mytest2 AS BEGIN SELECT name , city FROM student...
-
100% Placement Training Program Mr. Nilesh Gupta Founder , NRsolution4u https://nileshsir.com/ http://...