Free Search Engine Submission Search Engine Submission - AddMe ASP.NET Help, ASP.NET Tutorials, ASP.NET Programming, ASP.NET Tricks

Tuesday, March 9, 2010

Display date which we select in the calender


protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
Label1.Text = Calendar1.SelectedDate.ToShortDateString();
}

Display time and date in runtime in .net


protected void Page_Load(object sender, EventArgs e)
{
Response.Write(DateTime.Now.ToString());
}

How redirect onepage to another in .net


protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("nextpage.aspx");
}

Sign out code for .net
session.abdon();
response.redirect("loginpage.aspx");