开发者

button click event in asp.net mvc

开发者 https://www.devze.com 2023-01-11 10:09 出处:网络
I have a button and a label. on clicking on that button i wa开发者_运维问答nt to change the text of label.

I have a button and a label. on clicking on that button i wa开发者_运维问答nt to change the text of label. How can i do this in Asp.net mvc 1.0.


Unlike in ASP.NET Webforms, there are no events in ASP.NET MVC!

You could use HtmlHelper.ActionLink to create a link to the current view with a parameter containing the new label text.

For simple things that don't really deserve a parameter I would simply use JavaScript though.

0

精彩评论

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