my messages normally comes like this in SMSgateway(gateway forwarded the message to our application),
sett pØll 1 2 3 4 5 6 7 8 121011 ( this message is correct )
But some cases this message comes like,
sett p&oslas;ll 1 2 3 4 5 6 7 8 121011 (this message incorrect,Ø comes with &oslas;)
this message comes as a string,when message comes &oslas; i need to replace it to Ø. sometimes it comes with another name, like gordØn(gord&oslas;n) It always stat with & sign & endsup with ; sign.
Here i tries to do it,but my knowledge is not enough to complete this..
protected void Page_Load(object sender, EventArgs e)
{
try
{
string mobileNo = Request.QueryString["msisdn"];
int dest = int.Parse(Request.QueryString["shortcode"].ToString());
string messageIn = Request.QueryString["msg"];
string operatorNew = Request.QueryString["operator"];
string []reparr = messageIn.Split(' ');//split it & then check contains
reparr[1].Contains = '&';
reparr[1].Contains = ';';
// In here i need to check that character & replace it to originalone.
Label1.Text = "ok";
WriteToFile(mobileNo, dest, messageIn, operatorNew,true,"","");
messageIn.Replace("&oslas;", "ø");, but I think that usingHtmlDecodeis more flexible.