473,395 Members | 1,418 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,395 software developers and data experts.

Prevent round trip of postback

I have an htm page that will be passing data to the server via parameters in
a hidden iframe's aspx page. I not need the aspx page to return back to the
htm page because the mission has already been accomplished in the initial
page load event. also, this is not critical data so I don't need to notify
the use if something failed. After I execute the needed code in the page
load event, how can I cancel the operation to prevent anything going back to
the client?

Thanks.

--
mo*******@newsgroup.nospam
Sep 12 '07 #1
3 2681
moondaddy wrote:
I have an htm page that will be passing data to the server via parameters in
a hidden iframe's aspx page. I not need the aspx page to return back to the
htm page because the mission has already been accomplished in the initial
page load event. also, this is not critical data so I don't need to notify
the use if something failed. After I execute the needed code in the page
load event, how can I cancel the operation to prevent anything going back to
the client?
You can't really cancel a request, there is always a response to a
request as long as the server is working properly. The server can send
an http error back, but that is also a response.

Why don't you want a response? You can just send a response that
contains a simple string like "ok".

I would suggest that you use XMLHTTP instead of a hidden iframe. Any
code example for AJAX has code that sends a request using XMLHTTP and
gets the response as a string.

--
Göran Andersson
_____
http://www.guffa.com
Sep 12 '07 #2
Hi Moondaddy,

I think this case is the same to those other threads you've posted, correct?

If so, I think get additional response text should not be a problem since
you're using a hidden <iframeso that no one will see it. If what you
concern is to reduce the response data(avoid useless data transfer), you
can use Response.End to stop the communiation after you've done the work.
e.g.

==========
protected void Page_Load(object sender, EventArgs e)
{
//do your work here

Response.End();
}
=========

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
>Date: Wed, 12 Sep 2007 23:43:06 +0200
From: =?ISO-8859-1?Q?G=F6ran_Andersson?= <gu***@guffa.com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: Prevent round trip of postback
>
moondaddy wrote:
>I have an htm page that will be passing data to the server via
parameters in
>a hidden iframe's aspx page. I not need the aspx page to return back to
the
>htm page because the mission has already been accomplished in the
initial
>page load event. also, this is not critical data so I don't need to
notify
>the use if something failed. After I execute the needed code in the
page
>load event, how can I cancel the operation to prevent anything going
back to
>the client?

You can't really cancel a request, there is always a response to a
request as long as the server is working properly. The server can send
an http error back, but that is also a response.

Why don't you want a response? You can just send a response that
contains a simple string like "ok".

I would suggest that you use XMLHTTP instead of a hidden iframe. Any
code example for AJAX has code that sends a request using XMLHTTP and
gets the response as a string.

--
Göran Andersson
_____
http://www.guffa.com
Sep 13 '07 #3
Thanks Steven this is what I was looking for. And also thanks to Göran as I
will ultimately end up using his suggestion.
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:Ps**************@TK2MSFTNGHUB02.phx.gbl...
Hi Moondaddy,

I think this case is the same to those other threads you've posted,
correct?

If so, I think get additional response text should not be a problem since
you're using a hidden <iframeso that no one will see it. If what you
concern is to reduce the response data(avoid useless data transfer), you
can use Response.End to stop the communiation after you've done the work.
e.g.

==========
protected void Page_Load(object sender, EventArgs e)
{
//do your work here

Response.End();
}
=========

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.


--------------------
>>Date: Wed, 12 Sep 2007 23:43:06 +0200
From: =?ISO-8859-1?Q?G=F6ran_Andersson?= <gu***@guffa.com>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Subject: Re: Prevent round trip of postback
>>
moondaddy wrote:
>>I have an htm page that will be passing data to the server via
parameters in
>>a hidden iframe's aspx page. I not need the aspx page to return back to
the
>>htm page because the mission has already been accomplished in the
initial
>>page load event. also, this is not critical data so I don't need to
notify
>>the use if something failed. After I execute the needed code in the
page
>>load event, how can I cancel the operation to prevent anything going
back to
>>the client?

You can't really cancel a request, there is always a response to a
request as long as the server is working properly. The server can send
an http error back, but that is also a response.

Why don't you want a response? You can just send a response that
contains a simple string like "ok".

I would suggest that you use XMLHTTP instead of a hidden iframe. Any
code example for AJAX has code that sends a request using XMLHTTP and
gets the response as a string.

--
Göran Andersson
_____
http://www.guffa.com

Oct 5 '07 #4

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

Similar topics

2
by: Yanir | last post by:
H I have to display a sortable list of columns(a table or so) - by click on the title of a column, the column would be the criteria to sort by I know datagrid is very conveniant, but I want to save...
2
by: Mike | last post by:
Hello, I have a web user control that contains a ListBox. I would like to display some information based on the double-clicking of the user on a ListBox's item. I was thinking about some code...
6
by: msnews.microsoft.com | last post by:
Hello All, I am very new to ASP.NET and I have a basic question. Can somebody please explain? I have an .aspx Web Page with a textbox control. When the Page initially loads I am calling a...
8
by: needin4mation | last post by:
I understand this is a asp.net group, but thought I would post this here for comments. I admit I have used this post in another group, but it has less traffic. Here's to hoping I'm just blind to...
2
by: Larry | last post by:
Is there a way to disable all the controls the instant any auto-postback controls are changed (resulting in a postback that takes a couple seconds), so that the user can't continue changing other...
7
by: Tony Girgenti | last post by:
Hello. I'm trying to undetrstand ASP.NET 2.0 and javascript. When i have a button and i click on it and i see the web broswer progress bar at the bottom do something, does that mean that there...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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...

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.