PDA

View Full Version : .Net Problems


tbutcher
12-23-2008, 11:49 AM
I have got the .net control working fine on our site using the provided code but as soon as I put it in a master page or on a regular page with some extra controls I get the following error.

"Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. "

I have turned off EnableEventValidation but then no results appear. Has anybody seen anything similar?

I think there might be a fixed in the User Guide but the end of the line is cut off on page 98.

Thanks.

Tim

wrensoft
12-24-2008, 12:22 AM
You are correct, the solution to your problem is that page in the help file and it has indeed been cut off. We will fix this in a future release however for the time being here is what should be in the pdf.

C#
this.Form.Method = "GET";
this.Form.EnableViewState = false;
this.ClientScript.RegisterClientScriptBlock(GetTyp e(), "clr", @"document.getElementById('__VIEWSTATE').value = '';", true);

VB
Form.Method = "GET
Form.EnableViewState = False
Page.ClientScript.RegisterClientScriptBlock(Me.Get Type(), "clr", "document.getElementById('__VIEWSTATE').value = ''", True)