Page_Load i need to see which event fired the post back

Discussion in 'ASP .Net' started by WebBuilder451, Aug 8, 2008.

  1. In the page_load event i need to see which event fired the post back. what
    here allows this. I specificly want to know if the enter key was pressed. but
    i need to check for others.
    --
    (i''ll be asking a lot of these, but I find C# totally way cooler than vb
    and there''s no go''n back!!!)
    thanks (as always)

    kes
    WebBuilder451, Aug 8, 2008
    #1
    1. Advertising

  2. in Safari the default event for the panel does not fire. so on a login it
    works when you press enter for ie, firefox, but not safari.

    i'm using the text changed event on the password field, but this is still a
    poor solution.

    In my case i need to know if events were not fired so i can call login.
    --
    (i''ll be asking a lot of these, but I find C# totally way cooler than vb
    and there''s no go''n back!!!)
    thanks (as always)

    kes


    "Mark Rae [MVP]" wrote:

    > "WebBuilder451" <> wrote in message
    > news:...
    >
    > > In the page_load event i need to see which event fired the post back. what
    > > here allows this. I specificly want to know if the enter key was pressed.
    > > but
    > > i need to check for others.

    >
    > Generally speaking, this isn't the way ASP.NET works. E.g. when you click a
    > Button control, it initiates a postback and its Click or Command event
    > runs - you don't need to know in the Page_Load which object initiated the
    > postback... You don't need to know which control initiated the postback
    > because, whatever control it was, that's the event which will fire.
    >
    > However, it's fairly simple to find out this information:
    > http://www.google.co.uk/search?hl=en&q="ASP.NET" which control initiated postback&meta=
    >
    > Why do you need to know this in Page_Load...?
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
    WebBuilder451, Aug 8, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    1
    Views:
    440
    John Saunders
    Jul 9, 2004
  2. rockdale
    Replies:
    1
    Views:
    645
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Nov 16, 2006
  3. =?Utf-8?B?YmVycnkubW9yZ2Fu?=

    HOWTO determine in content page page_load if masterpage fired post

    =?Utf-8?B?YmVycnkubW9yZ2Fu?=, Apr 17, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    459
    =?Utf-8?B?YmVycnkubW9yZ2Fu?=
    Apr 17, 2007
  4. =?Utf-8?B?Yl9hc3AubmV0?=
    Replies:
    0
    Views:
    325
    =?Utf-8?B?Yl9hc3AubmV0?=
    Apr 18, 2007
  5. Andreas Klemt

    How can I find out in Page_Load which button event is fired?

    Andreas Klemt, Jul 9, 2004, in forum: ASP .Net Web Controls
    Replies:
    5
    Views:
    207
    Scott G.
    Jul 11, 2004
Loading...

Share This Page