AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 asp:panel
Posted by shivani on  12/21/2007 11:53:58 PM Category: Asp.Net 2.0
Add to my favorites
Email to friend
how to delete text from textboxes in panel after postback?

Post Your Reply Post New Question

 Viewer's Reply
Clear the Text in Textbox
Answered By Moderator1 on 12/23/2007 8:52:26 PM
Hi,

Use the below code to clear the Text in TextBox after postback

if (!ispostback)
{

}
else
{
TextBox1.Text="";
}
 
Clear Text in TextBoxes in aPanel
Answered By Sridhar Pettela on 12/24/2007 2:50:32 AM
Hai,

if u want to click a button then to clear the textboxes then
in Button Click Event
write this Code

foreach (Control c in Panel1.Controls)
{
if (c.GetType().Name == "TextBox")
{
(c as TextBox).Text = "";
}
}

Byeeee
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
Easing the Migration to Microsoft SQL Server 2005
Speech Technology Magazine
Everything You Know About CSS Is Wrong! - Free 37 Page Preview!