简体   繁体   中英

Javascript/Razor Request.Params A potentially dangerous Request.QueryString value was detected from the client

This javascript line gives me A potentially dangerous Request.QueryString value was detected from the client

$('a[href=#tabs1-pane' + @Request.Params["index"] + ']').tab('show');

Normally i would solve these issues by setting [ValidateInput(false)] on the controller, but how do i solve this in a view/javascript?

Check if this helps you

var tempdate=@Request.Params["index"];
$('a[href=#tabs1-pane' + tempdate.tostring()  + ']').tab('show');

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM