Visual Studio 2012 MVC 3 - Button action does not work

2

I spent a few years without using visual studio. Now I've tried again and I came across a problem.

I created a new web project in Visual Studio 2012, using the ASP.NET MVC 3 Web Application option. I asked for a new web form and put in it a Button and a Label. So the intention is to click the button to put any phrase in the Label.

To get started, I double-clicked the Button. Since Visual Studio has already created for me the function of the Click event on the button. Within the event, I put the action:

Label1.Text="Hello World";

No error, but when I run the project and click the button, nothing happens. I've never had this problem in previous versions of visual studio. In that version, and due to MVC, is there something different that I should do to the button perform the action when clicking it ???

    
asked by anonymous 25.10.2014 / 21:19

1 answer

2

It will not work, simply. MVC does not use Code Behind. It's another paradigm and another way to use pro Controller buttons and events. It is not worth explaining all the differences in this answer.

On the tag wiki there are tutorials and documents you read to get started.

    
25.10.2014 / 23:10