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,717
  • 14
  • 151
  • 146
Amr Elgarhy
  • 66,568
  • 69
  • 184
  • 301

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,421,763
  • 867
  • 9,128
  • 9,194
  • 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