473,386 Members | 2,042 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,386 software developers and data experts.

Server.Transfer or Response.Redirect Help

Hi There

I am using frames in an .asp application.

I have a constant Banner across the top (an .htm file), a variable menu down
the left and a main body (both .aspx)

I have added a file search facility in the menu down the left which takes
user input for an account number (in to a text box) and is supposed to
redirect the MAIN page to a customer info screen (on clicking a button in the
menu area) which takes the user input from the menu and OnPageLoad in the
main.aspx displays information about the account they have requested.

All basic stuff.... but I must be a little basic I'm afraid as I can not
work out how a button on the menu.aspx (I'm using OnItemCommand) is supposed
to make the main.aspx redirect rather than itself. At the moment, I enter an
account number and click search and the page appears all sqwidged up in the
menu.aspx area whilst main.aspx remains the same as before. I realise why
this is happening, but is there a way to alter the Server.Transfer to refer
to a different .aspx file than the one the action is in ?

Thanks for your help
Nov 19 '05 #1
2 2024
Stuart wrote:
All basic stuff.... but I must be a little basic I'm afraid as I can not
work out how a button on the menu.aspx (I'm using OnItemCommand) is supposed
to make the main.aspx redirect rather than itself. At the moment, I enter an
account number and click search and the page appears all sqwidged up in the
menu.aspx area whilst main.aspx remains the same as before. I realise why
this is happening, but is there a way to alter the Server.Transfer to refer
to a different .aspx file than the one the action is in ?


ASP.NET is not really designed to "post" data from one page to
another...this was really easy in "classic" ASP days, but with .NET
comes the concept of "post-backs" (the page that collects the data POSTs
it back to itself for processing). Along the same lines, ASP.NET is not
really designed to host multiple forms within the same ASPX page either
(although Wilson's Web Forms has over come this limitation).

One thing you could do would be to use a little bit of Javascript, and
change the location of the "main" frame to the page you want to load,
and pass the data in the query string. And, since you are already in a
framed environment, this action should not change the actual URL in your
browser window.

HTH...
Chris
Nov 19 '05 #2
Hi,

You will need to do this with javascript. Here is how I change one frame
from a button click on another frame:

Put this in your code behind for the button:

btn1.Attributes.Add("onclick", "LaunchOtherFramePage(); return false;")

Put this in your javascript in the .aspx page that holds the button:

function LaunchOtherFramePage() {
parent.document.getElementById("OtherFrame").src = "NewPage.aspx";
}

This will change the other frame and won't cause a postback on the page
holding the button that changes the other page. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Stuart" <St****@discussions.microsoft.com> wrote in message
news:5E**********************************@microsof t.com...
Hi There

I am using frames in an .asp application.

I have a constant Banner across the top (an .htm file), a variable menu down the left and a main body (both .aspx)

I have added a file search facility in the menu down the left which takes
user input for an account number (in to a text box) and is supposed to
redirect the MAIN page to a customer info screen (on clicking a button in the menu area) which takes the user input from the menu and OnPageLoad in the
main.aspx displays information about the account they have requested.

All basic stuff.... but I must be a little basic I'm afraid as I can not
work out how a button on the menu.aspx (I'm using OnItemCommand) is supposed to make the main.aspx redirect rather than itself. At the moment, I enter an account number and click search and the page appears all sqwidged up in the menu.aspx area whilst main.aspx remains the same as before. I realise why
this is happening, but is there a way to alter the Server.Transfer to refer to a different .aspx file than the one the action is in ?

Thanks for your help

Nov 19 '05 #3

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

Similar topics

6
by: \A_Michigan_User\ | last post by:
Ok, I give up... why do 1-4 work fine... but 5-6 give "can't find" errors? 1. Client-side VBscript code: call navigate("\\209.11.22.33\MyDir") 2. Client-side VBscript code: location.href...
5
by: Jon Sequeira | last post by:
Is there a way to redirect from an ASP.NET page to an ASP page without showing the ASP page's URL in the client's browser? This works perfectly with an HTML page, for example: path =...
3
by: Justin | last post by:
Hi, Im confused here over the usage of Response.Redirect and Server.Transfer. I used frameset for my work, what are the proper usages of the two methods that seems working similar.. The...
4
by: Harsh Thakur | last post by:
Hi, I'd like to know the performance related differences between Response.Redirect and Server.Transfer. I'd like to redirect the user to a different page. I can either do a...
8
by: Cathie | last post by:
Hi guys, I want to do a Server.Transfer to get to a second page, so that I may retrieve variables I have set in the first page. I'm doing that with the usual Server.Transfer("pagename", true). ...
1
by: Victor Song | last post by:
Hi We are trying to stream a file using server.transfer rather than response.redirect. We have it working for IIS 5.0 but IIS 6.0 refusing to let us transfer the file. If we do the less...
2
by: Pete | last post by:
Hi all... I sincerly hope one of the MS guys can clear this up for me... First some background... Ok, I have a web site which is fully translatable into several languages. All the strings...
3
by: Alan Silver | last post by:
Hello, Sorry if this is a stupid question, but I can't really see much difference between these tow methods according to the scant info in the SDK. Could anyone enlighten me? TIA -- Alan...
8
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
9
by: RN1 | last post by:
When a server encounters the line Response.Redirect("abcd.asp") in a ASP script, the server tells the browser that it has to be redirected to another page (which is abcd.asp, in this case)....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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,...
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
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...

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.