Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 how to clear the textboxes enterd data in with c#
Posted by charan on  3/17/2010 5:08:04 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
iam using asp.net2.0 with c#,in my website iam using
requiredfield validators and ajax controls if iam entered any incorrect values in textboxes then i want to clear the text boxes then i have return the code for clearing the controls in clear button . but when i click clear button then validation controls and ajax validator callout extenders is displaying and the textboxes are not clearing. how to solve this situations please give me example which helps me

Post Your Reply Post New Question

 Viewer's Reply
Set CauseValidation Property for TextBox
Answered By Moderator1 on 3/19/2010 10:30:17 PM

Set the CauseValidation Property of the Clear Button for False, then write the code to clear the textbox.

<asp:Button ID="Button1" runat="server"
CausesValidation="False" OnClick="Button1_Click" Text="Clear" />
iyt really helps
Answered By charan on 3/20/2010 12:21:00 AM
thanks for aspdotnetcodes team
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Integrating Silverlight 4 with SharePoint 2010 - Free 42 Page Sample Chapter
Washington Technology
Web Application Security — How to Minimize Prevalent Risk of Attacks