473,473 Members | 1,985 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Multiple gets from a page

Is such a scenario possible?

I have a page, which has 1 text box & 2 buttons.

When Button1 is clicked, it submits a GET to the server.
The server doesn't send a response to this get immediatelly, the
server is waiting for some other event to occur (not from the client,
but in it's own surrounding) before it responds.
Now when this is happening, if the user clicks on the 2nd button,
I want to send the text in the text box to the server through a 2nd
GET (served by a different asp page).

When I try this - my Page_load for the
2nd page doesn't get called at all?
Is such a thing possible at all? If not, any other change
I can make to my design to simulate this?


Jul 4 '06 #1
8 1181
Clint wrote:
Is such a scenario possible?

I have a page, which has 1 text box & 2 buttons.

When Button1 is clicked, it submits a GET to the server.
The server doesn't send a response to this get immediatelly, the
server is waiting for some other event to occur (not from the client,
but in it's own surrounding) before it responds.
Now when this is happening, if the user clicks on the 2nd button,
I want to send the text in the text box to the server through a 2nd
GET (served by a different asp page).

When I try this - my Page_load for the
2nd page doesn't get called at all?
Is such a thing possible at all? If not, any other change
I can make to my design to simulate this?
Just to clarify, I am using the built-in webserver with VS to try this
out.
Jul 4 '06 #2
And do what once the text is sent ? You could likely use an AJAX like
solution (try http://www.w3schools.com/dom/dom_http.asp).

Depending on what exactly you are trying to do another option could be also
to submit the data to always the same page and have your web page then use
System.Net.WebClient to submit these data to a third party site (if this is
what you are after).
--
Patrice

"Clint" <cl***@6url.coma écrit dans le message de news:
4g*************@individual.net...
Is such a scenario possible?

I have a page, which has 1 text box & 2 buttons.

When Button1 is clicked, it submits a GET to the server.
The server doesn't send a response to this get immediatelly, the
server is waiting for some other event to occur (not from the client,
but in it's own surrounding) before it responds.
Now when this is happening, if the user clicks on the 2nd button,
I want to send the text in the text box to the server through a 2nd
GET (served by a different asp page).

When I try this - my Page_load for the
2nd page doesn't get called at all?
Is such a thing possible at all? If not, any other change
I can make to my design to simulate this?


Jul 4 '06 #3
Patrice wrote:
And do what once the text is sent ?
Once the text is sent the server will do some action based on it &
send a response.
You could likely use an AJAX like
solution (try http://www.w3schools.com/dom/dom_http.asp).

Depending on what exactly you are trying to do another option could
be also to submit the data to always the same page
My main issue is that I am sending 2 GETS, the 2nd GET being sent
when a response hasn't yet been sent by the server for the first GET.

I am not able to do it successfully.
and have your web
page then use System.Net.WebClient to submit these data to a third
party site (if this is what you are after).
No - I am not sending it to a 3rd party site.

>
"Clint" <cl***@6url.coma écrit dans le message de news:
4g*************@individual.net...
>Is such a scenario possible?

I have a page, which has 1 text box & 2 buttons.

When Button1 is clicked, it submits a GET to the server.
The server doesn't send a response to this get immediatelly, the
server is waiting for some other event to occur (not from the client,
but in it's own surrounding) before it responds.
Now when this is happening, if the user clicks on the 2nd button,
I want to send the text in the text box to the server through a 2nd
GET (served by a different asp page).

When I try this - my Page_load for the
2nd page doesn't get called at all?
Is such a thing possible at all? If not, any other change
I can make to my design to simulate this?

Jul 4 '06 #4

Clint wrote:
When Button1 is clicked, it submits a GET to the server.
The server doesn't send a response to this get immediatelly, the
server is waiting for some other event to occur (not from the client,
but in it's own surrounding) before it responds.
Now when this is happening, if the user clicks on the 2nd button,
I want to send the text in the text box to the server through a 2nd
GET (served by a different asp page).
Is such a thing possible at all? If not, any other change
I can make to my design to simulate this?
Depending on what it is you want to do you might get a good result from
using AJAX.

Jul 4 '06 #5
Have you checked the IIS log ? For now I would say that you just post the
same page (this is the default behavior for ASP.NET, have you done something
to change this ?)

Before further investigation you may want to explain this group what you are
trying to do in a non technical way. The web is based on request/response
pairs. What should do the first response if you issue a second GET ?

Knowing exactly what is the overall goal, someone will perhaps suggest
another technical solution than the one you are currently investigating (the
first button could be an out of band request à la AJAX and the second one be
the real submit ?)

--
Patrice

"Clint" <cl***@6url.coma écrit dans le message de news:
4g*************@individual.net...
Patrice wrote:
>And do what once the text is sent ?

Once the text is sent the server will do some action based on it &
send a response.
>You could likely use an AJAX like
solution (try http://www.w3schools.com/dom/dom_http.asp).

Depending on what exactly you are trying to do another option could
be also to submit the data to always the same page

My main issue is that I am sending 2 GETS, the 2nd GET being sent
when a response hasn't yet been sent by the server for the first GET.

I am not able to do it successfully.
>and have your web
page then use System.Net.WebClient to submit these data to a third
party site (if this is what you are after).

No - I am not sending it to a 3rd party site.

>>
"Clint" <cl***@6url.coma écrit dans le message de news:
4g*************@individual.net...
>>Is such a scenario possible?

I have a page, which has 1 text box & 2 buttons.

When Button1 is clicked, it submits a GET to the server.
The server doesn't send a response to this get immediatelly, the
server is waiting for some other event to occur (not from the client,
but in it's own surrounding) before it responds.
Now when this is happening, if the user clicks on the 2nd button,
I want to send the text in the text box to the server through a 2nd
GET (served by a different asp page).

When I try this - my Page_load for the
2nd page doesn't get called at all?
Is such a thing possible at all? If not, any other change
I can make to my design to simulate this?


Jul 4 '06 #6
Henrik Stidsen wrote:
Clint wrote:
>When Button1 is clicked, it submits a GET to the server.
The server doesn't send a response to this get immediatelly, the
server is waiting for some other event to occur (not from the client,
but in it's own surrounding) before it responds.
Now when this is happening, if the user clicks on the 2nd button,
I want to send the text in the text box to the server through a 2nd
GET (served by a different asp page).
>Is such a thing possible at all? If not, any other change
I can make to my design to simulate this?

Depending on what it is you want to do you might get a good result
from using AJAX.
I am already using AJAX - the GETs I was talking about is something
like this

xmlHttp = GetXmlHttpObject(processResponse); // Hook a callback to the
response
xmlHttp.open("GET",url,true);
and then send.
This is the problem I am having.

My browser client does 2 things.
One of the GETs it sends is something for which the server can send a
response immediatelly.
- for eg. if the user clicks on a button "getinfoX" - it calls the server to
getinfoX which the
server returns immediatelly.

- The other GET is used in the following way - send a request to server
"send me a response
when some event happens at the server" i.e. when I send this GET the server
has no response to send immediately - but as and when the event happens,
the server uses this GET to inform the other clients about this. I don't
want to
use polling here & hence I want to send a GET to server which can be left
hanging around in the server to use for this notification.

To achieve this I have 2 frames on my client - one hidden & one regular.
One of them sends the regular GET as a result of user clicking the button
& the other sends the pending GET.

On the server, I have 2 pages, both derived from System.web.ui.Page.
I do the processing on Page_load in both the pages.

In the first one I have
protected void Page_Load() {
// stuff
Response.Write(something)

}
In the 2nd GET aspx - I have to have a loop like this.

protected void Page_Load() {
// stuff

while(true) {
if(HasEventHappened()) {
Response.Write(something);
break;
}
Thread.Sleep(sometime);

}
}
Now, because of this while loop, the server never gets the other GET at
all - i.e.
it seems to be stuck in this while loop & hence is not able to process the
other
GET.

I am total newbie with Web programming - so forgive me if my question is
totally
stupid.

Is my design totally wrong?
Is there a better way to achive what I want - i.e. the ability for a client
to
recieve 2 kinds of responses - one synchronous & the other asynchronous.
Jul 6 '06 #7
Patrice wrote:
Have you checked the IIS log ? For now I would say that you just post
the same page (this is the default behavior for ASP.NET, have you
done something to change this ?)

Before further investigation you may want to explain this group what
you are trying to do in a non technical way. The web is based on
request/response pairs. What should do the first response if you
issue a second GET ?
I have explained this in another post - my reply to Henrik
>
Knowing exactly what is the overall goal, someone will perhaps suggest
another technical solution than the one you are currently
investigating (the first button could be an out of band request à la
AJAX and the second one be the real submit ?)
What exactly is an out of band request - how is it done?
Jul 6 '06 #8
Clint skrev:
Is my design totally wrong?
Is there a better way to achive what I want - i.e. the ability for a client
to
recieve 2 kinds of responses - one synchronous & the other asynchronous.
I don´t know how to do it "manually", but the free AJAX.NET
(www.ajaxpro.net) AJAX library lets you define callback functions. This
is exactly what you want - call the serverside function and have it
call a clientside function when its done.

The backside of this is that Internet Explorer only allows you to have
2 connections waiting for response at any time - so if you have 2 of
them waiting, any other request to you site will be queued until 1 of
your active connections finishes.

Jul 10 '06 #9

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

Similar topics

4
by: Diane Selby | last post by:
Hi- I am developing an ASP.NET application that can take a few seconds to process the request from the user. We are looking for a client-side solution that will prevent users from resubmitting...
9
by: Jamie | last post by:
I am receiving an Invalid ViewState error after posting back to the same page twice. Consistently the error occurs after the second postback and not after the first. I have looked into creating...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
6
by: Bill | last post by:
Hi I am trying to get my listbox items to print if they stream past the one page mark. my code is working for one page of information (if the e.hasmorepages) is not there. But I am having...
18
by: Gleep | last post by:
I've searched google intensely on this topic and it seems noone really knows how to approch this. The goal I don't want clients to give out their usernames and passwords to friends, since the site...
6
by: thomson | last post by:
Hi All, i do hae a solution in which i do have mulitple projects including Web Projects,, Depending on the functionality it gets redirected to different web projects and it is working fine, ...
5
by: bhattpiyush | last post by:
Hi All, I have a class Transaction in 2 different assemblies having different namespaces totally. I have an ASP.Net(1.1) page. In the codebehind .cs file I references/imports one of those...
3
by: asdfghjklqwertyuiop | last post by:
Hi, I have been stucked with an issue related to Multiple iframes in IE-7 and session cookie since last couple of days. It will be highly appreciated if any one can provide me a solution for it....
4
by: Greg | last post by:
I have a complex page (with 8 complex user controls, and many other asp.net controls.) I have 2 very similiar pages to create, each page differing only from the others in one control. What is...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.