473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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

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

Nov 18 '05 #1
2 2151
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]" <ri********@hotmail.com> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #2
something like this ?
http://www.lostinet.com/en/lwsamplecs/?framesrc=rane/
is my remote scripting . free .

--
http://www.lostinet.com/
---------------------------
Lostinet.Web Controls&Components help you to build better Asp.Net
CustomerControl&UserControl&Application.
---------------------------
It's FREE !!
---------------------------
ControlHelper&HelperElement for MessageBox&Dialog
ComboBox,ComboCalendar,SmartIframe
---------------------------
Remote Asp.Net Execution

"Rick Strahl [MVP]" <ri********@hotmail.com> дÈëÓʼþ
news:eB**************@TK2MSFTNGP12.phx.gbl...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Matt | last post by:
I think this is the basic concept in ASP server-side development. My boss told me web application is NOT client-server application. I argued with him because browser is the client, and the server...
2
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a...
5
by: KathyB | last post by:
If someone could just explain this to me...I just don't get it! I have an aspx page where I retrieve several session variables and use xmlDocument to transform xml file with xsl file into an...
6
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
6
by: Valerian John | last post by:
I have a ListBox webcontrol on an aspx page. Items are added to the ListBox using client-side code. However, when the page is posted back the items are missing/not available. (It is like the...
0
by: angus | last post by:
Dear all, I would like to implement something like that: when a user submit a request to get an item from the stock...... it will check the stock in the database if the level of that item is...
5
by: Nate | last post by:
We are attempting to make a request to a web service (we will refer to it as XXXServices) hosted on a Web Logic server from a C# SOAP client. The server responds with a 401 Unauthorized error...
11
by: Jeff | last post by:
Hello everyone. I've searched through the archives here, and it seems that questions similar to this one have come up in the past, but I was hoping that I could pick your Pythonic brains a bit. ...
1
by: Simon_21 | last post by:
Hi All, I have a servlet which is invoked from a jsp page. While the serlvet is executing, the jsp page is waiting for the servlet to complete. When the servlet completes, it informs the waiting...
5
by: =?Utf-8?B?TWFyaw==?= | last post by:
Hi... I've got a .Net client to a soap service that works for the most part, but there are a couple of things I'd like to improve: 1) the first request to the client wrapper always takes...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.