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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -