Click here to Skip to main content
15,909,953 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Expert,

In my asp.net website there is one page category.aspx.


On that page i take form which contain one dropdownlist, one textbox,1 asp.net button(buttOk), and one html reset button.

Initially reset button reset all the control.
But When i click Ok button(buttOk) it not working.same thing happens when dropdownlist selectedindexchanged event fires.

Is there any control present in asp.net for reset? or i have to write code for it?


Thanks in advance.
Posted

Its better that you use an ASP.net button and write code on its click event
 
Share this answer
 
Comments
udusat13 18-Oct-11 6:19am    
Thankssss....
Hi,
Place a Asp.Net Button Control and write a code in the Click Event.

The Sample Code for reset controls in a page:

dropdownlist1.SelectedIndex = dropdownlist1.Items.IndexOf(dropdownlist1.Items.FindByText(string.Empty)); //For this u need to add string.Empty value in the control load time.

Txtbox1.text = string.Empty;


Thanks...
 
Share this answer
 
Comments
udusat13 18-Oct-11 6:49am    
Thanksssssssssssssss...

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