Click here to Skip to main content
15,885,918 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greetings for the day,
I did make user control for date picker on my register form now i want to delete value of that control after submittion
ex
mydatepicker.value.clear() can i use ??
Posted
Comments
Member 11221185 29-May-15 2:02am    
After completing the code of save button you can just set text box value like:
Textbox1.text = "";

yes you can use mydatepicker.value.clear(). it will work.
 
Share this answer
 
Comments
Member 10874581 29-May-15 2:23am    
nt working..
You can use below code to reset

C#
public static void ClearTextBoxes(Control parent)
    {
     foreach (Control c in parent.Controls) {
       if (c.GetType() == typeof(TextBox))
       {
         ((TextBox)(c)).Text = string.Empty;
       }
    }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900