I am using Asp.net-mvc 2.0, while i am going to give ajax.actionlink pop to call a new page actionresult i am not able to call pop-up, it thrown an error.
My sample code:-
<%= Ajax.ActionLink("GetFuncao", "GetFuncao?height=155&width=300&inlineId=hiddenModalContent&modal=true", "Funcao", new { ID = Model.ID_Sistema },
开发者_如何学C new AjaxOptions { }, new { @class = "thickbox", id = "thickbox", title="Cadastro de Sistemas" })%>
While I am using this code , following error occurred,
"A potentially dangerous Request.Path value was detected from the client (?)."
Can you help me to fix this issue. Thanks for your time.
You should pass query string parameters in the routeValues
not with the action name, like this:
<%= Ajax.ActionLink(
"GetFuncao",
"GetFuncao",
"Funcao",
new {
ID = Model.ID_Sistema,
height = "155",
width = "300",
inlineId = "hiddenModalContent",
modal = "true"
},
new AjaxOptions { },
new { @class = "thickbox", id = "thickbox", title="Cadastro de Sistemas" }
)%>
Move your route values into the correct place, i.e.
<%= Ajax.ActionLink("GetFuncao", "GetFuncao", "Funcao", new { ID = Model.ID_Sistema, height=155, width=300, inlineId="hiddenModelContent", modal = true },
new AjaxOptions { }, new { @class = "thickbox", id = "thickbox", title="Cadastro de Sistemas" })%>
精彩评论