473,830 Members | 2,199 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Server.Transfer or Response.Redire ct 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 2045
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", "LaunchOtherFra mePage(); return false;")

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

function LaunchOtherFram ePage() {
parent.document .getElementById ("OtherFrame"). src = "NewPage.as px";
}

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****@discuss ions.microsoft. com> wrote in message
news:5E******** *************** ***********@mic rosoft.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
4567
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 ="\\209.11.22.33\MyDir" 3. Typing "\\209.11.22.33\MyDir" into my ie6 browser. 4. Typing "\\209.11.22.33\MyDir" into my Windows Explorer. 5. Server-side ASP: server.transfer "\\209.11.22.33\MyDir" 6. Server-side ASP: response.redirect...
5
2650
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 = "~/cp/test.htm" Server.Transfer(path, False) But with an .asp extension, the I get an HttpException, "Error executing child request for ~/cp/test.asp."
3
9088
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 problem i faced while using Response.Redirect is that the page that is directed to, does not looks as desired..the textboxes are not visible anymore and so as
4
2121
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 Response.Redirect("URL") or a Server.Transfer("URL"). So I'd like to find out which is more efficient/better. Can anyone please tell me or give any pointers to links on the web? Thanks & Regards
8
3789
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). My problems are as follows: 1. On the initial load everything seems to be referencing from the first page. For example, my style sheet I reference using "../../styles.css" but it seems to need "../styles.css" as the first page is one step...
1
3501
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 efficient prompt/response technique to the browser both work fine. We found this article that was only slightly appicable (ms-help://MS.MSDNQTR.2004APR.1033/enu_kbiis/iis/326965.ht kb 326965 ) but since csv is already a defined mime type this shouldn't...
2
3382
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 for the web site are held in a database and all the labels, buttons etc are populated at run time in the Page_Load handler. The retreval of the strings from the database is all
3
5513
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 Silver
8
3914
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 need to avoid the extra round-trip to the client. I've tried Passing the page name, the full URL, and the instance of the handler class to the Transfer method, but everything gets me the same error 500. Any help would be appreciated.
9
4355
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). The browser then makes a new request to the server to redirect itself to abcd.asp after which the user gets redirected to abcd.asp. But in case of Server.Execute (or Server.Transfer), when the server
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10774
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
10489
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
7746
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
5617
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
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
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 we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.