Encoding problem in SQL Server 2008 -


I am trying to save a screen name in columns in SQL Server 2008 without any special and international characters so that I You can use it in the column in the URL.

Can you give some technical suggestions on how to save this name with any particular or international letter?

The original purpose of this column is to use the URL.

Thank you very much.

You should urlencode the stars you store in the database instead of "deleting" illegal characters .

  string url = "http://xyz.com/" + System.Web.HttpUtility.UrlEncode (myFieldContent);   

This will replace the "special" character with their respective percentage encoding. See for more information.

Comments