C
Chris Kettenbach
Good Morning,
I have a text box on a webform I use to display a phone number. The
database field does not contain parentheses or hyphens. I want the use to
be able to change the textbox text and be able to click an update button to
save the changes to the database? My question is how do I remove the
unwanted characters and save that value to the database? I use a function
in the text attribute of the control to set the display value. like
text="<%# formatphone(databinder.eval(Container.DataItem, "phone")) %>' and
this works great. Basically i want to undo this when saving to the
database. I wanted to use a regex object but I am not familiar enough with
it to code it correctly. Any advise would be great. Thanks everyone!!
Regards,
Chris
I have a text box on a webform I use to display a phone number. The
database field does not contain parentheses or hyphens. I want the use to
be able to change the textbox text and be able to click an update button to
save the changes to the database? My question is how do I remove the
unwanted characters and save that value to the database? I use a function
in the text attribute of the control to set the display value. like
text="<%# formatphone(databinder.eval(Container.DataItem, "phone")) %>' and
this works great. Basically i want to undo this when saving to the
database. I wanted to use a regex object but I am not familiar enough with
it to code it correctly. Any advise would be great. Thanks everyone!!
Regards,
Chris