![]() ![]() The ID of the control which causes the postback is stored in the _EVENTTARGET hidden field, so you can find the control which caused the postback. After this, the page is submitted back to the server. If we inspect the code of the _doPostBack function, we can see that it first sets the values of two hidden fields with the two parameters passed to the function. The two hidden variables can be accessed from the code behind using the forms or params collection. Let’s check up on the code fences below to. As a photographer, he has achieved critical acclaim photographing world leaders and major cultural figures, including presidents, writers, artists, actors and musicians. ![]() Later, with the second argument, we will explain any necessary message or action referred to after a valid post. Timothy Greenfield-Sanders is a Grammy winning and Emmy nominated film director. These arguments allow identifying the event that will cause the post method to get fired. The value of the parameters eventTarget and eventArgument are stored in the hidden fields. The dopostback () function of JavaScript takes two parameters, EventTarget and EventArgument. When a page is posted back to the server ASP.NET inspects _EVENTTARGET and _EVENTARGUMENT values and this way it can decide which of the controls caused the page to be posted back and what is the event that has to be handled. In any ASP.NET page the two hidden fields: _EVENTTARGET and _EVENTARGUMENT are automatically declared. My 5 - Pushing the 4000 answers boundary with only 94 answers to go magnificent effort Ali Al Omairi: The link provides a number of points on something that seems quite similar to your problem - it also contains further pointers to other discussions and examples. I have a simple asp.net page with an asp.net link button and asp.net content tag which point to a simple asp.net master page with an asp.net content place holder and a form tag. The function takes the following two arguments:ĮventTarget - This contains the ID of the control that caused the post back.ĮventArgument - This contains any additional data associated with the control. You can see this _doPostBack function in your ASP.NET generated HTML code. Today I am going to talk about the _doPostBack function, because there is some confusion with using this function. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |