Click here to Skip to main content
16,017,922 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hello guys
M trying to make a web user control, On submiting wrong data validation control triggers and prevent RESET button to reset all controls.

I was trying to determine the Control ID of the submit button so that validation control only triggers on button click event of submit button.

Any solution will be appreciated.
Posted
Comments
Asp_Learner 4-Jul-13 10:06am    
Please elaborate your question more
Nitesh Agarwal 4-Jul-13 14:25pm    
I need to determine which control has caused postback... so dat i can perform particular function depending on the control which caused postback

Hi,

The most common control that causes postback is "Button". To check which control (apart from Button) will cause postback, you can put breakpoint inside the page_load method.

While debugging your application, you click on any control, and if the execution/debugging comes to that breakpoint during the page load, then this will tell you that the control is causing postback.


Thanks,
SJ
 
Share this answer
 
Why dont you do validation grouping for submit button only ,after that your reset button will be safe from validations

Refer Here

http://www.codedigest.com/Articles/ASPNET/26_Validation_group_in_ASPNet_20.aspx[^]
 
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