Results 1 to 3 of 3

Thread: ASP.NET Question: In Page_Init, how can you find which control caused the PostBack?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    122

    Question ASP.NET Question: In Page_Init, how can you find which control caused the PostBack?

    Hi, there.

    I have some code that must be run in the Page_Init event of my ASP.NET page. However, this code should only be run if a certain button is clicked. The problem that I am having is that the Page_Init event fires before the Button_Click event.

    Is there a way, in the Page_Init event to find out which control caused the page PostBack? If so, I can use this to determine whether to run the code.

  2. #2
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    I dont know about ASP .net but in standard ASP I either set a hidden control or send something back in the URL to indicate the users action (IE what button they clicked)...
    Leather Face is comin...


    MCSD

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Oct 2001
    Posts
    122
    Thanks...that works!

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