Reputation: 6056
I have a field with nvarchar datatype to store UNICODE value. This field is bound to Repeater Control from which i am redirecting to other page on clicking the link. When this field contains the numeric value in field then, i get the correct QueryString and it displays the Redirected page. But, When it contains some unicode charater(Other than Number or English Character) then it show the value '?????' in QueryString of 'fhn'. How to get this UNICODE QueryString value as it is and display result?
In Repeater ItemTemplate:
<b>घर क्र./House No.</b><%# Eval("HouseNumber")%>
<a href="AddressList.aspx?li=<%=Request.QueryString["li"].Trim().ToString() %>&fhn=<%# Eval("HouseNumber")%" target="_blank">या पत्यावरील </a>
In .cs file:
string HouseNumber = Request.QueryString["fhn"].ToString().Trim();
//here i get the '????' value if it contains unicode value.
Help appreciated!
Upvotes: 4
Views: 3110
Reputation: 7438
You'll have to be a more precise. You could set request and response encoding in your web.config file:
<system.web>
<globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" />
</system.web>
Upvotes: 1
Reputation: 398
Try changing it to something more like this:
<!-- Web.Config Configuration File -->``<configuration>
<system.web>
<customErrors mode="Off"/>
<globalization fileEncoding="iso-8859-1" requestEncoding="iso-8859-1"responseEncoding="iso-8859-1"/>
</system.web>
</configuration>
Upvotes: 1