I hate those razor helpers. (LabelFor, TextboxFor...) they try to help me but they teach me nothing.
I want to try with ASPX engine. when I open it there is even toolbox on the left with all old good html commands. why can't i use it ?
how come that when i try to buil app intellisense say runat="server" is required when I know MVC doesn't need that ?
In brief how do I write HTML w/o using helpers ? Any constructive advice would be appreciated.
Sample:
<%@ Page Language="VB" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">Home Page</asp:Content>
<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:ListBox runat="server">
<asp:ListItem Text="text1" />
<asp:ListItem Text="text2" />
</asp:ListBox>
</asp:Content>
Error:
`Server Error in '/' Application.
Control 'MainContent_ctl00' of type 'ListBox' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Control 'MainContent_ctl00' of type 'ListBox' must be placed inside a form tag with runat=server.
Source Error:
Line 22: <ul id="menu">
Line 23: <li><%: Html.ActionLink("Home", "Index", "Home")%></li>
Line 24: <li><%: Html.ActionLink("About", "About", "Home")%></li>
Line 25: </ul>
Line 26: </div>`