Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7178421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:55:06+00:00 2026-05-28T16:55:06+00:00

I know about the viewstate and dopostback and everything, I just don’t know where

  • 0

I know about the viewstate and dopostback and everything, I just don’t know where the reference to the fired event goes. Say, button1.click is fired, then when the page goes through the postback cycle, and then page.load is executed, then the raised event must be executed, but how does asp.net know which event it was?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T16:55:07+00:00Added an answer on May 28, 2026 at 4:55 pm

    The content posted with request that is made when you click a button for example, contains the name of the control that raised the event. In the following, I used an HTTP Headers reader tool that shows the information sent in an HTTP request and checked the requests sent by clicking two buttons on a Web Form. Each request has a different value set for Button= in the post data under content.

    http://localhost:1182/Pages/NewFolder1/WebForm1.aspx
    
    POST /Pages/NewFolder1/WebForm1.aspx HTTP/1.1
    Host: localhost:1182
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 548
    __VIEWSTATE=viewstateblahblah&__EVENTVALIDATION=eventblahblah&**Button2=Button**
    [..omitted parts for brevity..]
    ----------------------------------------------------------
    http://localhost:1182/Pages/NewFolder1/WebForm1.aspx
    
    POST /Pages/NewFolder1/WebForm1.aspx HTTP/1.1
    Host: localhost:1182
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 548
    __VIEWSTATE=blah blah state&__EVENTVALIDATION=viewstateblahblah&**Button1=Button**
    [..omitted parts for brevity..]
    ----------------------------------------------------------
    

    Update: To augment my answer, consider the following content that is posted to the server when two events are sent to the server at the same time (e.g. a Button.Click and
    a ComboBox.SelectedIndexChanged).
    _VIEWSTATE=view state encrypted blah blah &_EVENTVALIDATION=event validation encrypted blah blah&DropDownList1=Three&Button1=Button

    So the form is built in a way that event information is added to the HTTP request that is posted to the server. The parameters contain the names of the controls that rose the event and I think all of this is encrypted in the __EVENTVALIDATION parameter that makes sure that no tampering occured in the events that were raised and the controls that raised them. Its like a hash of the event information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a question about viewstate and custom controls in asp.net. Say I have
I know about getopts and argp . I just looked in boost and they
I know about Application.Exit() but what if I'm not in a windows forms application
I know about the HIG (which is quite handy!), but what programming practices do
I know about SortedSet , but in my case I need something that implements
I know about this question: Which (third-party) debug visualizers for Visual Studio 2005/2008 do
I know about code-behind files, but what is the best real-world way of Designers
I know about using a -vsdoc.js file for IntelliSense , and the one for
I know about the buttonMode property on a MovieClip (to get the hand cursor
I know about passwd(1) and crypt(3) . What I'm looking for is a C

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.