|
-
Jan 9th, 2006, 10:04 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Detect which object caused Post
Ok, my problem is, i have made a map and tab control on my page where they will cause the page to refresh, this way i can still use onclick on my button to go, but i am having difficulty figuring out how i can make it search if enter is pressed on the textboxes.
Textbox's textchanged event is raised if when the next time the form is submitted, the text is different.. any object submitting the page will run this function, so it's out.
in classic ASP you can give objects the same name and then check that names value to see which was used.. since i actually need every field though, this way wouldnt possibly work, and im not sure if this is even still possible in .net
is there a way to find out which control caused the page to be submitted to the server? or is there any other way i can achieve this?
-
Jan 10th, 2006, 02:01 AM
#2
Thread Starter
Frenzied Member
Re: Detect which object caused Post
With some playing around I found the answer.
the page has a PreRender event, this event is called after all other object events, so by setting variables in objects events it is easy to detect which object was used.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|