- <!--HTML helper method for TextBox with ID only -->
- <%= Html.TextBox("txtFirstName") %>
- <input id="txtFirstName" name="txtFirstName" type="text" value="" />
- <!--HTML helper method for TextBox with ID and Value -->
- <%= Html.TextBox("txtFirstName","Alice") %>
- <input id="txtFirstName" name="txtFirstName" type="text" value="Alice" />
- <!--HTML helper method for TextBox with ID and Value and custom attributes. use '@' if the attribute name is keyword in C# or VB -->
- <%= Html.TextBox("txtFirstName", "Alice", new { @class="error", client_selector="alphanumeric" })%>
- <input class="error" client_selector="alphanumeric" id="txtFirstName" name="txtFirstName" type="text" value="Alice" />
Dotnet 3.5 interview questions and answers Headline Animator
Wednesday, September 9, 2009
How to use textbox
HTML Helper for TextBox will be rendered as input elements in HTML. Check the below code.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment