473,850 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2175
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********@hot mail.com> wrote in message
news:eB******** ******@TK2MSFTN GP12.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&Compon ents help you to build better Asp.Net
CustomerControl &UserControl&Ap plication.
---------------------------
It's FREE !!
---------------------------
ControlHelper&H elperElement for MessageBox&Dial og
ComboBox,ComboC alendar,SmartIf rame
---------------------------
Remote Asp.Net Execution

"Rick Strahl [MVP]" <ri********@hot mail.com> дÈëÓʼþ
news:eB******** ******@TK2MSFTN GP12.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
2578
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 code put in server. Then web application should be a client-server application. My understanding is that a web application is an application that runs on a browser. But client-server application is not necessary a web application. Please...
2
3949
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 test on it that if the network broken at the time the client have already send the remoting request and waiting for the server, the client side will wait infinitely by default, even if i already set the executionTimeout to 90seconds in...
5
3618
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 instruction document (not data based) - same as using an xml web control. The resulting html is on the client? but what about the server side of things? Trying to figure out how to change and save the xmlDocument. It I put a button OUTSIDE of the...
6
3749
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 architecture into .Net -- not looking to do it at this time, just to understand how I would achieve it. In the old environment, we had two classes, a client and a server class, that managed a data object. The server object knew how to interface with the...
6
6514
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 page does not know the items were added client-side.) TIA, Val
0
886
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 smaller than a certain of amount if so......a confirmation (javascript:confirm('')) will be generated after
5
12533
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 (that appears in plain text), and causes the client to crash. This C# code has been deployed both as an ASP.NET application and a WinForms app, each of which produced the same result. Further, moving the clients from a Windows XP machine to Windows...
11
4898
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. Here's a broad overview of what I need to do: cross-platform, client- side GUI apps that interact with a server backed by a database. I'd also like the possibility of having a web interface for small portions of the app. It will be a fairly...
1
2783
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 jsp to redirect to another page. The waiting jsp has implemented onload which will redirect to the page informed by the servlet Server : (tomcat 6.0), Browser - IE 6.0, OS - WinXP
5
3079
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 12-15 seconds even though the web server shows < a half second spent on the request. What takes so much time for the client wrapper to warm up? All subsequent requests, even to the same method, take the half second.
0
9895
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11008
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10666
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10724
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9501
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7899
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5735
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5929
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4140
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.