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

Discussion in 'ASP .Net' started by Rick Strahl [MVP], Jan 7, 2004.

  1. 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
     
    Rick Strahl [MVP], Jan 7, 2004
    #1
    1. Advertising

  2. Rick Strahl [MVP]

    bruce barker Guest

    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]" <> wrote in message
    news:...
    > 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
    >
    >
    >
     
    bruce barker, Jan 8, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Kingscott
    Replies:
    0
    Views:
    576
    Mike Kingscott
    Dec 5, 2003
  2. Matt
    Replies:
    14
    Views:
    4,114
    Chad Z. Hower aka Kudzu
    Jan 30, 2004
  3. JezB
    Replies:
    3
    Views:
    524
  4. Boss302
    Replies:
    0
    Views:
    1,061
    Boss302
    Nov 21, 2006
  5. linkswanted
    Replies:
    1
    Views:
    935
Loading...

Share This Page