13

I saw code like this:

if (this.Request["__EVENTARGUMENT"] == "Flag")
   //DoSomthing...

What does __EVENTARGUMENT mean and are there some parameters like it to access?

Jasper
  • 75,105
  • 13
  • 148
  • 145
Amr Elgarhy
  • 63,002
  • 67
  • 183
  • 299

1 Answers1

20

It can be set by calls to __doPostBack in the JavaScript on the page.

This article explains it in a bit more detail.

Jon Skeet
  • 1,335,956
  • 823
  • 8,931
  • 9,049
  • In case of dynamic LinkButton `Request["__EVENTARGUMENT"]` is coming as empty string. http://stackoverflow.com/questions/14486733/how-to-check-whether-postback-caused-by-a-dynamic-link-button – LCJ Jan 29 '13 at 12:04
  • The second link is broke and redirects to a unrelated website. – user2389345436357 Oct 07 '16 at 14:55
  • @user2389345436357: Thanks, removed. (Would remove the answer, given that it's almost link-only now, but I can't as it's accepted.) – Jon Skeet Oct 07 '16 at 14:56