Chinese Characters are getting grabled in my silverlight application
Asked By sandy narang
05-Aug-10 05:36 AM
Hi All,
I am having a tough time in sending the Chinese Characters through my silverlight application to other server.
Assume that I have a url which is having Chinese Characters in it. I am usnig webclient now and once the request reached at server. it is getting grabled as ‘’. Pleae find the code below -
string strName= "您好";
url = adminUrl + "DataUpdateHelper?name=" + strName;
WebClient webClient = new WebClient();
webClient.Encoding = Encoding.UTF8;
Uri uri = new Uri(url);
webClient.OpenReadCompleted += new OpenReadCompletedEventHandler(ReadEventCompleted);
webClient.OpenReadAsync(uri);
Does anyone knows the solution for this?
Thanks,
Sandy
re: Chinese Characters are getting grabled in my silverlight application
onur replied to sandy narang
21-Aug-10 07:47 AM
Hi,
I have same problem with Turkish characters. Did you find any solution?
re: Chinese Characters are getting grabled in my silverlight application
sandy narang replied to onur
21-Aug-10 10:46 PM
Hi onur,
There would be two solution which i found for the same -
1. You need to UrlEncode the chinese
characters. Sometime we have to encode it two times and decode it once. Like this:
string strName= HttpUtility.UrlEncode(string);
Don't forget to use the corresponding decode method on the other end.
2. Instead of using the Get Request please use Post request. it will solve your problem.
I am using second approach for my solution.
Hope this will be helpful for you.
Thanks,
Sandy


Chinese Characters are getting grabled in my silverlight application Hi All, I am having a tough time in sending the Chinese Characters through my silverlight application to other server. Assume that I have a url Encoding.UTF8; Uri uri = new Uri(url); webClient.OpenReadCompleted + = new OpenReadCompletedEventHandler(ReadEventCompleted); webClient.OpenReadAsync(uri); Does anyone knows the solution for this? Thanks, Sandy
silverlightshow.net / items / Uploading-and-downloading-images-from-WCF-in-Silverlight.aspx To save image- For storing file into database first File > New Project > Select the language (C# or VB) > Select ‘Silverlight’ in the Project Types > from the templates, select ‘Silverlight Application’. Type a name ‘AccessImagesInDatabase’ and location for the project unable to view the templates, you do not have Microsoft Silverlight Tools for Visual Studio 2008. Check out this link to shown here convBmp.Save(context.Response.OutputStream, ImageFormat.Jpeg) Note : Silverlight does not support .bmp images. For this reason, we set The next step is to call this handler from our Silverlight application. C# using System.Windows.Media.Imaging; public partial class request the image as a stream, we will use the OpenReadAsync method of the WebClient. Let us see some code: First txtProgress.Text = String.Empty; wc = new WebClient(); wc.OpenReadCompleted + = new OpenReadCompletedEventHandler(wc_OpenReadCompleted); wc.OpenReadAsync(new Uri(imgUri, UriKind.Absolute)); txtProgress.Text = "Fetching Image. . ."; / / img1 m trying to make here is that when developing in Silverlight, we’ll also come in a situation where we want
public MainPage() { InitializeComponent(); WebClient client = new WebClient(); client.OpenReadCompleted + = new OpenReadCompletedEventHandler(webClient_OpenReadCompleted); client.OpenReadAsync(new Uri("Kalimba.mp3", UriKind.Relative)); } void webClient_OpenReadCompleted(object sender Hello The local file won't work in a normal Silverlight application because of Silverlights "sanboxed" security model. Running a normal Silverlight application in your browser, you can't access local resources application. Have a look at this video tutorial http: / / www.silverlight.net / learn / videos / all / local-file-access / , if you want to learn more about accessing local files using Silverlight. I created a sample app and pointed it at your
SilverLight What is SilverLight, its concept, why to use it and how to use it What is Silverlight? Silverlight is a new cross-browser, cross-platform implementation of the Mozilla Firefox, Apple Safari, Opera. The plugin required to run Silverlight is very small in size hence gets installed very quickly select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing Javascript and ASP.NET AJAX code to complement functionality which you have already created. Silverlight aims to compete with Adobe Flash and the presentation components Sun Microsystems' JavaFX, which was launched a few days after Silverlight. Currently there are 2 versions of Silverlight: Silverlight 1.0 : Silverlight 1.0 consists of the core presentation
silverlight and wpf difference if one person has gain master in silverlight than wiil this help him in learning wpf Hi Malik WPF has a more advanced and mature XAML support than Silverlight. Silverlight used to be called (WPF / E) and is a subset is hardware accelerated and supports things like GPU shaders which Silverlight 2 does not. Silverlight 2 does have the VisualStateManager inside Blend 2, which I to work. I think that is the only case where Silverlight 2 XAML was / is slightly ahead of WPF's. Here aspx Here is a good article on MSNMAG about designing Silverlight / WPF apps together and sharing code: http: / / msdn.microsoft.com a desktop application platform built on the .Net (3+) platform. Silverlight Silverlight is based on a much smaller and more compact CLR
Silverlight What is the purpose of Silverlight? Why it is used? How can I use silverlight in my application? Any simple web example of silverlight with VS 2005 and .Net Framework 2.0 (not the Hellow world Application). ? I want to start with Silverlight and I am very new to Silverlight. What is Silverlight? Microsoft Silverlight is a web browser plugin that provides support for rich applications such as animation, vector graphics and audio-video playback. Silverlight provides a retained mode graphics system, similar to WPF and viewing animation and audio-video playback. How can I use silverlight in my application? see the following links www.wynapse.com
Explain Silverlight and XAML Hi Friends, I dont have any idea about silverlight and XAML. Silverlight: 1) What is meant by Silverlight? 2) What is the purpose of using Silverlight? 3) What are the things required to run and implement the Silverlight? XAML: 1) What is the abbreviation of XAML? 2) What hi rama, the answers of your questions are as below Silverlight: 1) What is meant by Silverlight? Microsoft Silverlight is a programmable web browser plugin that enables features such to GNU / Linux. 2) What is the purpose of using Silverlight? Silverlight is a plugin from Microsoft that is a lot
Silverlight Webpart: Could not download the silverlight applicato I have developed simple hello World Silverlight Application in silverlight 4 and tried to deploy into Sharepoint Site. But it showing following error. Could not download the silverlight applicaton or the silverlight plugin did not load. I followed following steps: 1.Created Simple Hello world Silverlight Program . And it is run good in localhost. 2. My in different method given in http: / / www.silverlightshow.net / items / Silverlight-and-Sharepoint-2010-getting-started.aspx but for all the this example Creating a web part to display the associated Silverlight application 1. using the existing solution outlined in the previous some HTML which will instruct the browser to load the Silverlight application. Luckily the HTML has already been written for us