473,941 Members | 22,892 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 2050
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
4570
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
2653
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
9097
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
2129
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
3795
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
3505
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
3388
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
5520
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
3921
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
4368
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
10134
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
11117
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
11296
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
10659
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9860
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
8218
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
6299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4487
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3507
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.