When I click on the link in the gridview,I am getting this below error. please anybody can help me.
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
and my page goes like this
<%@
Page
Language
="
C#"
AutoEventWireup
="
true"
CodeBehind
="
PatientMapByFacility.aspx.cs"
EnableEventValidation
="
false"
MasterPageFile
="
~/Master_Pages/PhysicianMaster.Master"
Inherits
="
CarePortalOnline.CareHIEUI.PatientMapByFacility"
%>
When I set
EnableEventValidation=
"
false"
OnClick="lnkView_Click"
event is not firing.
Dim
btn
As
LinkButton =
CType
(sender, LinkButton)
Dim
g
As
GridViewRow =
CType
(btn.NamingContainer, GridViewRow)
Dim
rowindex
As
Int16
= g.RowIndex
Dim
hid
As
HiddenField
hid = gvPatient.Rows(rowindex).Cells(
0
).FindControl(
"
hidid"
)
Dim
lnkbtn
As
LinkButton
lnkbtn = gvPatient.Rows(rowindex).Cells(
3
).FindControl(
"
LinkButton1"
)
GetAllPatientList()
try using this...onclick event of linkbutton in a gridview..I had already used this code and working fine..Change it in C# and use.
1) First Check whether you write some HTML tags inside the Textbox that you are going to store it on DB.
Sol: set the
EnableEventValidation="False"
either place this on page Directive or put this on
web.config
file
2) Check whether you are going to bind the data to Gridview , dropdownlist or any server control you should place the binded code within the
IsPostBack
-- property on
Page_Load
Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad
spelling and grammar.
If a question is poorly phrased then either ask for clarification, ignore it, or
edit the question
and fix the problem. Insults are not welcome.
Don't tell someone to read the manual. Chances are they have and don't get it.
Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Invalid postback or callback argument. Event validation is enabled using 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
When i set EnableEventValidation="false" nothing is happening. I mean no click event is firing...