c# - Save Extension in Data base with .(Dot) -
i getting extension name user save in db in asp form . how can validate user enter extension name .(dot) , without .(dot) name generate error.
do want validate data user entering on form, before submitting? if so, may looking regularexpressionvalidator. see: https://msdn.microsoft.com/en-us/library/eahwtc9e(v=vs.71).aspx , http://asp.net-tutorials.com/validation/regular-expression-validator/ use 1 of regular expressions webruster , ahsan provided you.
sample:
<asp:textbox runat="server" id="txtext" /> <asp:regularexpressionvalidator runat="server" id="rexdot" controltovalidate="txtext" validationexpression="^[.]([a-za-z0-9]+)?$" errormessage="please enter dot!" />
Comments
Post a Comment