Bigquery แนะนำ การเขียนเว็บไซต์ ด้วยการใช้ภาษา php html css webmaster tips & tools BigQuery.com พร้อมที่จะถ่ายทอดประสบการณ์ การทำเว็บไซต์แบบง่าย.. เพื่อเป็นพื้นฐานในการเขียนเว็บไซต์ และเพิ่มลูกเล่นให้กับเว็บไซต์ อีกทั้งเป็นทางเลือกในการสร้างเว็บไซต์ด้วยเครื่องมือต่างๆ

Tuesday, January 22, 2008

RegularExpressionValidator decimal

User Control RegularExpressionValidator with number and decimal regex
Try this regex -
\d{1,}\.?\d{0,}

put to e.g. ValidationExpression="\d{1,}\.?\d{0,}"
==========================================

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtWeight"

ErrorMessage="Format(X.XX)" ValidationExpression="\d{1,}\.?\d{0,}"></asp:RegularExpressionValidator>

==========================================

0 comments: