_EVENTTARGET
-
AFAIK,
Request.Params("_EVENTTARGET")
is supposed to return the name of the control id that fired the postback. But in my VB.Net web app, it returns an empty string! Does this only work in C#?? Is there anyway I can find which control fired the postback? Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain -
AFAIK,
Request.Params("_EVENTTARGET")
is supposed to return the name of the control id that fired the postback. But in my VB.Net web app, it returns an empty string! Does this only work in C#?? Is there anyway I can find which control fired the postback? Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain -
It returns the name of the control id that fired the postback unless no one call the postback function. If a button is responsible for the postback the form will be submit without using the __dopostback.
So is there a way to find which button caused the postback? Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain -
So is there a way to find which button caused the postback? Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain -
but that's the thing. I've been trying to get the button ID with
Request.Params("_EVENTTARGET")
and all it returns me is an empty string. Am I doing something wrong? Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark Twain -
but that's the thing. I've been trying to get the button ID with
Request.Params("_EVENTTARGET")
and all it returns me is an empty string. Am I doing something wrong? Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning Mark Twain
Get your facts first, and then you can distort them as much as you please Mark TwainThe button ID should appear as a key in the
Form
collection. You should: Check the_EVENTTARGET
for data. if the_EVENTTARGET
is empty look in the key collection of theForm (Page.Form)
for one of the buttons. If you found one of them, he is the responsible for the postback.