Quantcast
Channel: User Benjamín Camacho Castro - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by Benjamín Camacho Castro for Render ASP.NET TextBox as HTML5 Input type "Number"

$
0
0

You could use the members of the Enum TextBoxMode

<asp:TextBox ID="MyAwesomeId" runat="server" TextMode="Number"></asp:TextBox>

This render

<input type="number" value="5" id="MainContent_MyAwesomeId" c>

the full Enum is

public enum TextBoxMode{    SingleLine = 0,    MultiLine = 1,    Password = 2,    Color = 3,    Date = 4,    DateTime = 5,    DateTimeLocal = 6,    Email = 7,    Month = 8    Number = 9,    Range = 10,    Search = 11,    Phone = 12,    Time = 13,    Url = 14,    Week = 15}

Viewing all articles
Browse latest Browse all 4

Trending Articles