jquery - A potentially dangerous Request.Form error when paging through gridView in update panel -
please excuse me if duplicate question. have searched , found many posts regarding error, yet none of them seem me (perhaps due ignorance).
i getting value of cell of gridview , placing in hidden field. gridview in updatepanel. here code (jquery):
$('#<%=hdfcurrbatchid.clientid %>').val($('.selectedrow td:first').html());
this works fine when loading page , doing action on page. works ok when changing value of dropdownlist asyncpostbacktrigger updatepanel , causes grid reload (and hidden field value changes). works ok if change selectedrow.
but if try page through grid, error: potentially dangerous request.form value detected client (ctl00$maincontent$hdfcurrbatchid=">t...").
i added web.config , still error (i using 4.0). dont want add valdiateinput = false because compromises security. there else can do? doing wrong way getting value of cell?
thanks help. let me know if there other code need see.
this because have content in textbox/problem area considered dangerous... built .net prevent script executing malware, or injections. since control , if feel safe doing it, put @ top of aspx page, in page directive:
validaterequest="false" %>
and way, has nothing jquery.
Comments
Post a Comment