Results 1 to 2 of 2

Thread: [RESOLVED] Detect which object caused Post

  1. #1

    Thread Starter
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    Resolved [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?

  2. #2

    Thread Starter
    Frenzied Member Phill64's Avatar
    Join Date
    Jul 2005
    Location
    Queensland, Australia
    Posts
    1,201

    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
  •  



Click Here to Expand Forum to Full Width