468,738 Members | 1,760 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,738 developers. It's quick & easy.

Page_Load i need to see which event fired the post back

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
Aug 7 '08 #1
3 2841
"WebBuilder451" <We***********@discussions.microsoft.comwrote in message
news:E3**********************************@microsof t.com...
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...postback&meta=

Why do you need to know this in Page_Load...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 8 '08 #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" <We***********@discussions.microsoft.comwrote in message
news:E3**********************************@microsof t.com...
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...postback&meta=

Why do you need to know this in Page_Load...?
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 8 '08 #3
"WebBuilder451" <We***********@discussions.microsoft.comwrote in message
news:2D**********************************@microsof t.com...

[top-posting corrected]
>>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.

Why do you need to know this in Page_Load...?

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.
Ah - that's a totally different question. Loads of stuff about Safari and
the Enter key on the net:

http://www.google.co.uk/search?sourc...22Enter+key%22
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Aug 8 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Stevie_mac | last post: by
4 posts views Thread by Alfons Puig | last post: by
14 posts views Thread by V. Jenks | last post: by
4 posts views Thread by Seraph | last post: by
12 posts views Thread by Nathan Sokalski | last post: by
17 posts views Thread by Arpan | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.