what is the use of enableeventvalidation? [Resolved]

Posted by Oswaldlily under ASP.NET on 9/18/2012 | Points: 10 | Views : 28193 | Status : [Member] | Replies : 4
what is the use of enableeventvalidation?
its present in all asp page but not in master page of page directives.
Can anyone gives me reason




Responses

Posted by: Muhsinathk on: 9/18/2012 [Member] Bronze | Points: 50

Up
0
Down

Resolved
1)The EnableEventValidation attribute indicates whether event validation should be performed. The default value is true.
[ConfigurationPropertyAttribute("enableEventValidation", DefaultValue = true)]
public bool EnableEventValidation { get; set; }
2)When the EnableEventValidation property is set to true, ASP.NET validates that a control event originated from the user interface that was rendered by that control. A control registers its events during rendering and then validates the events during postback or callback handling.

For example, if a list control includes options numbered 1, 2, or 3 when the page is rendered, and if a postback request is received specifying option
number 4, ASP.NET raises an exception. All event-driven controls in ASP.NET use this feature by default.



Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vikash on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
As far as i am concerned, it is used to validate postback and callback events. A content page that contains all the viewstate and control state information is posted back to server and so only content page is identified in browser. So in my opinion, postback is done by a content page and not the master page.

Regards,
Vikash Pathak

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/18/2012 [Member] Bronze | Points: 25

Up
0
Down
Please mark as answer if it helpful to you..That helps others who search the same.

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
Good Work Muhsinathk

Thanks & Regards
Hari

Oswaldlily, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response