Converting button events etc to ASP.NET MVC
- by Sophie88
Given an asp.net webform page which does something like
asp.net
<asp:textbox id="txtA" runat="server" />
<asp:textbox id="txtB" runat="server" />
<asp:button id="btnAddTogether" runat="server" text="Go" onclick="btn_Click"/>
<asp:textbox id="txtResult" runat="server" />
code behind
protected void btn_Click(...)
{
txtResult.Text = txtA.Text + txtB.Text;
}
How would I convert this to ASP.NET MVC. It's a pretty trivial example, but I'm not sure about how to change my way of thinking.