开发者

can we call javascript function in c# code in Asp.net MVC view?

开发者 https://www.devze.com 2022-12-25 23:57 出处:网络
I want开发者_C百科 to get and pass the HTML element(a textbox) value as a query string to the Ajax.ActionLink(), is this possible? If yes, then please tell me how?Thanks in advanceThe HTMLHelper rende

I want开发者_C百科 to get and pass the HTML element(a textbox) value as a query string to the Ajax.ActionLink(), is this possible? If yes, then please tell me how? Thanks in advance


The HTMLHelper renders the a-tag before any value has been set to a textbox. If you want a kind of dynamical action you should consider creating the AJAX-link by yourself. Or you could try to insert an OnClick-javascript-function which manipulates the a-tag's href-attribute to add a MVC-value into the URL... but I'm not sure if the HTMLHelper will add the HTMLOptions before or after the AJAX-onClick-valules...

0

精彩评论

暂无评论...
验证码 换一张
取 消