Can't load web form in web service

  • Thread starter Thread starter James Wong
  • Start date Start date
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
 
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
 
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.
 
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
 
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.
 
Back
Top