Post Data using shdocvw

Stephanieb

Newcomer
Joined
Jun 1, 2003
Messages
18
Hi,

I am using the shdocvw to post data to forms in VB.net. This has worked really well to send one or two word fields.

Now I have a textarea in the form. On the website you have to fill in this form and tick whether its html or text. The result is then emailed to you.

If I send this via code and this is text, the linefeeds and control linefeeds have been cut out - ie all squashed together.

If I send this in html it does actually sometimes work, but more often it comes through blank.

Do I need to encode this? How can I do this? I presume there are characters that are illegal? Any push in the right direction would be highly appreciated.

Thanks,
Stephanie :)
 
have you tried converting the text you want to post to bytes
maybe use this..
Code:
System.Convert.ToByte
i know that with windows sockets you normally send out the data as bytes like this...
Code:
Sock.SendData(Sock.StringToBytes(txtData.Text & vbCrLf))
hope this helps a little :)
 
thanks,

not sure whether this would work........as its a cgi script I am sending the data to using the browser component.

It wants the variables in pairs:
var1=value1&var2=value2 (....etc)

if I convert this to bytes, wont the script need to reconvert it?

I am not sure, but I think the problem lies in the special characters which the browser wont accept.......

Stephanie :)
 
Web Browsers won't accept misc characters in the tag areas but thats about it. Make sure the script is not generating incorrect html pages.

Sending the message as numbers won't make any difference because transmission reliability is the same and besides, it will have to be turned back into text at the other side.
 
Back
Top