How to pass <br> string to webservice ?

A

al

Greetings,

I have asp.net page with a textbox. This textbox is used to pass
values(mainly strings) to VB.NET webservice using Webservice-behavior.

User may enter <br> value in that textbox which will cause a problem
since XML parser does not accept <br> to pass to webservice.

My question is how can I pass <br> to webservice as a string or any
convertible type without causing the XML parser error.


MTIA,
Grawsha
 
M

Mohamed El Ashmawy

Hello Grawsha,
What is the .net framework version that you use?


I tried it and it worked.
I created a web service that has a method that accepts a string and returns
it back.
I developed a small asp.net applicaiton that contained one page. In the
page, there is a button which submits the value of a textbox to the service
and get the reponse of the web serive.


I entered <BR> in the textbox and submitted it to the service. The
webservice was able to process itand reutnr itback to my asp.net web form.

The only problem that I faced was the need to set "validateRequest" of the
page to false as it would stop the transfer and give an error if it's set
to true.

Please check the .net framework version that you are having [I am using.Net
framework 1.1] and check that you set "validateRequest" to false at the
start of your ASP.Net page.

Regards
Mohamed El Ashmawy
MEA Developer Support Center
ITWorx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,182
Latest member
BettinaPol

Latest Threads

Top