andrew Sullivan
andrew Sullivan

Reputation: 4084

button click event in asp.net mvc

I have a button and a label. on clicking on that button i want to change the text of label. How can i do this in Asp.net mvc 1.0.

Upvotes: 1

Views: 2272

Answers (1)

Vinz
Vinz

Reputation: 2005

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.

Upvotes: 1

Related Questions