Reputation: 674
When I enter the data in textbox and then click a button it should insert it in the gridview but the arabic letters shown as "??????????" like shown in the picture, I searched and found that the problem in the encoding but the problem with me is not in the web page because the web page show the arabic letters correctly , the problem in the gridview
I also try this code but its not work:
Response.Write("<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />");
Upvotes: 0
Views: 1973
Reputation: 239
Just add this CharSet=UTF8 to the connection string in the settings of the App Project.
Upvotes: 0
Reputation: 4489
Hey You have to make sure that the content encoding for your web pages is UTF, otherwise it is not going to work. Here are few tips:
Make request and response encoding as UTF-8. Add this in the web.config for application level encoding:
<configuration>
<system.web>
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"/>
</system.web>
and add this for page level encoding:
<%@ Page RequestEncoding="utf-8" ResponseEncoding="utf-8" %>
Hope it helps you
Upvotes: 1