I'm new to ASP MVC and I'm completely stuck.
All I want to do is have a control like this:
<td><asp:TextBox ID="txbFirstName" runat="server" Value=""></asp:TextBox></td>
But have it populated by a value from a controller.
This syntax is what I was expecting would work:
<td><asp:TextBox ID="txbFirstName" runat="server" Value="<% Model.FirstName%>"></asp:TextBox></td>
But obviously it doesn't. I hope from that you can tell what I'm trying to do (populate the value of the text box with a server control) but that won't work. Is this not possible using ASP:Textboxes? Do I need to use HTML boxes instead?
Apparently in ASP 4 MVC the <% %>
tags are no longer used and I cannot find a working example anywhere. I thought this would be a simple google but I've been stuck for hours.
Thank you for any help you can provide.