Help - how could I get web response after submitting programmatically?

  • Thread starter Thread starter Jackal
  • Start date Start date
J

Jackal

I have a form page(abc.aspx) that contains some fields need to be filled in
before submitting,
and the action of the form is "def.aspx". After peocessing the filled-in
data, it'll return the result.
Is there any chance I could get the result by programming?

[Original Process]
Fill in data on "abc.aspx" --> Submit --> "def.aspx" requests the data -->
Processing --> Returns the result to "abc.aspx"

[Desired Process]
Send WebRequest to "def.aspx"(e.g.
WebRequest.Create("http://server/def.aspx?Type=AUTH&OrderNo=0001"))
--> Processing --> Returns the result to "abc.aspx"

Any idea?

Any suggestion is appreciated
 
Is there something wrong with the approach you've described as "Desired"?
There shouldn't be anything stopping you from making a webservice request
from one page to another.

--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.
 
You cannot use the WebRequest class on the client-side unless the user
has the .NET framework installed on their machine.

Instead, you can use web service behavior. It allows you to use
javascript to make a web service request and retrieve the results
without reloading the page.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndude/html/dude01222001.asp

I think the web service behavior can create a much better user
experierence, and some very powerful web pages, but it can also make
it very difficult to maintain the code because you are using quite a
bit of javascript to pack the data, send it to a web server, unpack
the return data, and map it to the screen controls. Additionally, it
has a security risk because you are moving more processing to the
client-side where you have much less control.

This approach will work very nice for a simple web application, but if
you have a complex web application that has over a hundred webforms,
then this approach might not work very well. It is much harder to
debug javascript errors, and this will increase the cost to maintain
your code.

Tommy,
 
Back
Top