Can't load web form in web service

J

James Wong

Hi everybody,

I'm developing a web service using VB.NET which calls a web form to let user
input something. In web service, I use Server.Execute ("WebForm.aspx") to
load and execute the web input form. But the browser (IE6) says there is a
missing necessary space on the following declaration statement:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

I don't know what whether I use the wrong way to get my goal which is
1. load a web form
2. user input value on web form
3. user click "finish" button on web form
4. close web form and return input value to caller (web service)
5. process the input value
6. return result to client of web service

Thanks for your kindly help and advice!

Regards,
James
 
N

Natty Gur

Hi,

I really don’t know what you after. But if you want to get the page
content you need to pass StringWriter in the execute method.

System.IO.StringWriter writer = new System.IO .StringWriter () ;
Server.Execute ("WebForm.aspx",writer) ;
string s = writer.ToString();

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 
R

Rick Spiewak

You can't do it the way you describe, but you can have the browser (Web
Forms) application call on the Web Services. So, the caller is the Web Form,
not the Web Service.
 
J

James Wong

Hi Rick,

Thanks for your reply! If I use web form application to call web services,
I still need to return som values (after process) to its caller (maybe
another web form application, or windows form application). I don't know
whether I should use HttpWebRequest / HttpWebResponse pair to pass
parameters and get result in point of view of caller, and also how the web
form application understand inpurt parameters and prepare result.

Thanks again for your kindly advice!

Regards,
James
 
R

Rick Spiewak

Unless you need to have a person interact with the information from a web
browser, I would have the program which needs the information make the Web
Services call.
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top