C
Chris Marsh
Hi,
We are taking information in a simple sales prospect entry form on our web
site via asp.net, we want to capture accurate data so we have included the
following expression validator:
<asp:regularexpressionvalidator id="Regularexpressionvalidator1"
ValidationExpression="((\(\d{3}\)?)|(\d{3}-))?\d{3}-\d{4}"Runat="server"
ErrorMessage="Enter a valid office phone number"
ControlToValidate="txtOfficePhone"></asp:regularexpressionvalidator>
It works perfectly making sure that the number is entered in (999)555-1212,
of course preventing the garbage data we had before however the problem is
that we don't actually want the masks ()-- stored in the SQL table.
Is there a way that I can strip the mask out before it gets to SQL data
table either with a trigger or with something on the ASP.net side? Does
someone have an example to help me with?
Thanks,
Chris
We are taking information in a simple sales prospect entry form on our web
site via asp.net, we want to capture accurate data so we have included the
following expression validator:
<asp:regularexpressionvalidator id="Regularexpressionvalidator1"
ValidationExpression="((\(\d{3}\)?)|(\d{3}-))?\d{3}-\d{4}"Runat="server"
ErrorMessage="Enter a valid office phone number"
ControlToValidate="txtOfficePhone"></asp:regularexpressionvalidator>
It works perfectly making sure that the number is entered in (999)555-1212,
of course preventing the garbage data we had before however the problem is
that we don't actually want the masks ()-- stored in the SQL table.
Is there a way that I can strip the mask out before it gets to SQL data
table either with a trigger or with something on the ASP.net side? Does
someone have an example to help me with?
Thanks,
Chris