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

I have a webform on which many controls such as button,dropdownlist,checkbox, texboo find out which control has intiaited the txes are there
for which autopostback property is set to true.

How can I find the control On page load event which has intiated the postback.

Thanks in Advance
Posted
Comments
Al Moje 14-Oct-11 4:54am    
Suggest you to use the debugger breakpoint tag to find out which control has initiated.

 
Share this answer
 
v2
Comments
André Kraak 14-Oct-11 5:01am    
I made your link click-able.
shijuse 14-Oct-11 5:02am    
Thanx lot
THE SK 14-Oct-11 5:43am    
Thanks it works
Hi,

check my code once

C#
string g = Page.Request.Params.AllKeys[2].ToString();


In the above code you'll get control name which control raised postback event

if "g" value is "ASP.NET_SessionId" means that page is not a postback
otherwise it has control name

All the Best
 
Share this answer
 
Comments
THE SK 14-Oct-11 5:44am    
Thanks , it works
Muralikrishna8811 14-Oct-11 5:45am    
most welcome

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