I'm assuming that Message is a String so at whatever point Message is set ... add ..
If Message.Contains(" ") Then Message = Message.Replace(" ", " &") Yes it is a double ampersand; needed to register as a literal. On Tuesday, 10 July 2012 10:40:59 UTC+1, Jeena wrote: > > Thanks for the reply, > > But this message is directly entered from Client side, so is there any > chance to detect the space & add this ‘’ in between? > > > > *Thanks & Regards* > > *Jeena Ajiesh* > > > > *From:* dotnetdevelopment@googlegroups.com [mailto: > dotnetdevelopment@googlegroups.com] *On Behalf Of *Barry Etheridge > *Sent:* Thursday, July 05, 2012 5:15 PM > *To:* dotnetdevelopment@googlegroups.com > *Subject:* [DotNetDevelopment] Re: Post Data using Httpwebrequest in > Asp.net > > > > HTTP responses will ignore spaces. Try Welcome Back > > On Wednesday, 4 July 2012 08:22:23 UTC+1, Jeena wrote: > > Friends, > > I want to post the data to another url and i have the code like: > > Dim uri As New Uri("http://www.xxx.asp") > > Dim data As String = "" > > If (uri.Scheme = uri.UriSchemeHttp) Then > > data = "Msg=" & Message & "&Source=" & Source & "&Msgtype=Type > 1" > > > > Dim request As HttpWebRequest = HttpWebRequest.Create(uri) > > request.Method = WebRequestMethods.Http.Post > > request.ContentLength = data.Length > > request.ContentType = "application/x-www-form-urlencoded" > > > > Dim writer As New StreamWriter(request.GetRequestStream()) > > writer.Write(data) > > writer.Close() > > > > Dim response As HttpWebResponse = request.GetResponse() > > Dim reader As New StreamReader(response.GetResponseStream()) > > Dim tmp As String = reader.ReadToEnd() > > response.Close() > > End If > > I have a message like “Welcome back”, this message cannot be fixed in > program, > it will change accordingly. > > Everything is working fine except , it displays message like > “Welcomeback”.Space is missing. > > Does anyone know why it is so? > > > > *Thanks & Regards* > > *Jeena Ajiesh* > > > > -- > You received this message because you are subscribed to the Google > Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML > Web Services,.NET Remoting" group. > To post to this group, send email to dotnetdevelopment@googlegroups.com > To unsubscribe from this group, send email to > dotnetdevelopment+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en > or visit the group website at http://megasolutions.net > -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to dotnetdevelopment@googlegroups.com To unsubscribe from this group, send email to dotnetdevelopment+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net