Hello.
I draw a line from the table I clicked on in the textbox. I tried to do it, but the error comes out
"Invalid postback or callback argument. Event checking is enabled using <pages enableEventValidation =" true "/> in configuration or <% @ Page EnableEventValidation =" true "%> per page"
How to remove this error without using EnableEventValidation="true"
, but through RegisterForEventValidation
?
Asp.net framework 2.0 c #
My code is:
// Нажатие на кнопку вывода таблицы public void FindAdr_click(object sender, EventArgs e) { adres_data.SelectParameters.Remove(adres_data.SelectParameters["ul"]); adres_data.SelectParameters.Add("ul", adr_name.Text.ToString()); adres_data.SelectParameters["ul"].DefaultValue = adr_name.Text.ToString(); } //событие RowDataBound protected void adrTabl_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton _singleClickButton = (LinkButton)e.Row.Cells[0].Controls[0]; string _jsSingle = ClientScript.GetPostBackClientHyperlink(_singleClickButton, "Select$" + e.Row.RowIndex); e.Row.Style["cursor"] = "hand"; e.Row.Attributes["onclick"] = _jsSingle; e.Row.Attributes["onmouseover"] = "this.style.cursor='pointer';this.style.textDecoration='underline';"; e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';"; } } } // На выбор строки protected void adrTabl_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow selectedRow = adrTabl.SelectedRow; adres.Text = selectedRow.Cells[1].Text + ",," + selectedRow.Cells[2].Text; adresF.Text = selectedRow.Cells[1].Text + ",," + selectedRow.Cells[2].Text; }