Storing freetextbox data into sql server without HTML Tags

724 Views Asked by At

iam new to use Free TextBox in asp.net application, now my doubt is how to store freeTextBox data in database without HTML Tags(That means only data should be stored in the database) and another doubt is iam copying data from Ms excel and word more than 20 pages at a time and pasting in freeTextBox its taking more time to copying in freeTextbox.

1

There are 1 best solutions below

0
On

You can html encode the text, if you are worried about injection attacks. or you can set EnableHtmlMode="True" or False as the case

example - I have enabled html.

<FTB:FreeTextbox  ID="txtDescp" 
      runat="server"  Width="900px" EnableHtmlMode="True" 
      ConvertHtmlSymbolsToHtmlCodes="True"    ></FTB:FreeTextbox >

Just like any other textbox control, add a button to submit the page and write code to insert to database on the button click event