Pages

About Me

My photo
ForEach(Minute in MyLife) MyExperience ++;
Showing posts with label all controls. Show all posts
Showing posts with label all controls. Show all posts

Monday, November 14, 2011

Pass Values Between ASP.NET Web Pages

There are mainly five ways to pass values between asp.net web pages ...
1.By using query string.
2. Using HTTP POST
3. Using Session
4. Using Public properties
5.Using control information of controls

.... ( Detail reading )

Wednesday, July 27, 2011

Clear all controls in a webform

private void Clear(Control Parent)
{
foreach (Control Child in Parent.Controls)
{
if (Child.HasControls())
Clear(Child);
else
{
if (Child.GetType() == typeof(TextBox))
((TextBox)Child).Text = "";
}
}
}
protected void Button1_Click(object sender, EventArgs e)

{

Clear(this.Page);
}
}