Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Client Side Web Request and auto-submitting ASP.Net pages

Reply
Thread Tools

Client Side Web Request and auto-submitting ASP.Net pages

 
 
Rick Strahl [MVP]
Guest
Posts: n/a
 
      01-07-2004
Run into an interesting problem today with a client of mine:

They have an ASP.Net form that they want to drive through a client side HTTP
interface. I know a Web Service would be a better way to go but in this case
they want to try and consolidate a single interface for the 3 or 4 forms
involved and drive them through a WebRequest Http client.

The data is getting there no problem - it's retrievable with
Request.Form["formfield"]. However ASP.net is not doing anything to fire
events or even assign the data back to the original form fields.

Anybody know of a way to trigger ASP.Net to force it to read and assign the
form variables and fire events?

I think the problem is likely to be viewstate (even though it's disabled
there's still viewstate being placed on the form), but even when I post back
the viewstate from the 'base' page it doesn't work.

This seems like a fairly major issue if there is no workaround since you
basically cannot drive HTML remotely through ASP.Net forms...

Any ideas how to make this work?

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      01-08-2004
there is no problem driving an asp.net site thru a http client. you are
correct, you need to pass back the valid viewstate that came with the page.
to fire events you need to emulate browser behavior.

when the client requests (gets) the form how are you parsing the html to get
the viewstate.
when the client posts the form back, it needs to send the submit button
value, for the button to firte an event.
when the client post back from a non-submit control, it has to fill in the
postback hidden fields.

also what user agent is the client using, and how is it supporting cookies?

-- bruce (sqlwork.com)



"Rick Strahl [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Run into an interesting problem today with a client of mine:
>
> They have an ASP.Net form that they want to drive through a client side

HTTP
> interface. I know a Web Service would be a better way to go but in this

case
> they want to try and consolidate a single interface for the 3 or 4 forms
> involved and drive them through a WebRequest Http client.
>
> The data is getting there no problem - it's retrievable with
> Request.Form["formfield"]. However ASP.net is not doing anything to fire
> events or even assign the data back to the original form fields.
>
> Anybody know of a way to trigger ASP.Net to force it to read and assign

the
> form variables and fire events?
>
> I think the problem is likely to be viewstate (even though it's disabled
> there's still viewstate being placed on the form), but even when I post

back
> the viewstate from the 'base' page it doesn't work.
>
> This seems like a fairly major issue if there is no workaround since you
> basically cannot drive HTML remotely through ASP.Net forms...
>
> Any ideas how to make this work?
>
> +++ Rick ---
>
> --
>
> Rick Strahl
> West Wind Technologies
> http://www.west-wind.com/
> http://www.west-wind.com/weblog/
> ----------------------------------
> Making waves on the Web
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to execute client-side code _after_ client-side validation? Bogdan ASP .Net 2 06-09-2008 01:31 PM
Client side script after client side validation with asp.net 2.0 Boss302 ASP .Net 0 11-21-2006 08:43 AM
client-side browser timeout OR server-side web server timeout?? (please help) jrefactors@hotmail.com Java 0 01-04-2005 04:06 AM
ASP.NET Web Forms Validation Controls are Server-Side or Client-Side Validation? Matt ASP .Net 14 01-30-2004 09:15 AM
Adding custom client-side onClick handler with client-side validator controls Zoe Hart ASP .Net Web Controls 1 01-08-2004 10:45 PM



Advertisments