How to allow only number with 1 decimal value in asp Textbox while typing
I have an .aspx page with a FormView control in it. Under InsertItemTemplate and EditItemTemplate, I have an asp Textbox which shall allow only numbers with 1 decimal value in it, I want to put this check while entering the data in Textbox.
Example: 12.3 (not more than 1 decimal point number)
Textbox control under InsertItemTemplate:
<asp:TextBox ID="txtPIRPCSBPerc" runat="server" BackColor="#ffff99" CssClass="project_brief_font_textbox" Text='<%# Bind("PIR_PERCENTAGE") %>' />
Textbox control under EditItemTemplate:
<asp:TextBox ID="txtPIRPCSBPerc" runat="server" BackColor="#ffff99" CssClass="project_brief_font_textbox" Value='<%# Eval("PIR_PERCENTAGE") %>' />
Can someone please help me to achieve it using javascript or jquery?
I have searched many posts for the same but nothing has helped me so far.
Thank you so much in advance.