473,386 Members | 1,842 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.

how to redirect to a frames-based html page and load the right html when coming from an ASP.NET page


Hi--

I need a code sample of how to redirect from an ASP.NET page to a
frames-based html page and specifying what should load in the destination's
frames.

Any ideas?

(Even air-code is much appreciated.)

The long story is this. I have 2 sites. One is in DotNet and one is html
and frames. The DotNet site is a section by section rewrite of the html and
frames site. So the html site has 2 frames, one is the left nav and the
other is content. So, from the html site, I can simply point to a new
section that is in DotNet and the user goes to the DotNet site for that
section. Then, when in the DotNet site, if the user wants to go to a
section has NOT yet been rewritten in DotNet, then the DotNet nav needs to
send the user back to the html site and load the left nav and the correct
content. And so on.

If you can help, please post a code snippet.

Thank you very much.

--Mark
Nov 17 '05 #1
2 2473
Here is one untested idea ...

IF your HTML site can support ASP, ASP.NET, Perl, Java,
etc, you could create one new page that is a frameset
wrapper, which will generate the frameset HTML based on
QueryString or FormVars. You could then pass those vars
to that page and have it generate the frameset that would
specify the locations. Here is a very crude ASP example:

<frameset cols="100,*">
<frame src="Nav.htm" />
<frame src="<%=Request("ContentURL")%>" />
</frameset>

(As always, validate input for things like cross-site
scripting.)

hth,
Frank
-----Original Message-----

Hi--

I need a code sample of how to redirect from an ASP.NET page to aframes-based html page and specifying what should load in the destination'sframes.

Any ideas?

(Even air-code is much appreciated.)

The long story is this. I have 2 sites. One is in DotNet and one is htmland frames. The DotNet site is a section by section rewrite of the html andframes site. So the html site has 2 frames, one is the left nav and theother is content. So, from the html site, I can simply point to a newsection that is in DotNet and the user goes to the DotNet site for thatsection. Then, when in the DotNet site, if the user wants to go to asection has NOT yet been rewritten in DotNet, then the DotNet nav needs tosend the user back to the html site and load the left nav and the correctcontent. And so on.

If you can help, please post a code snippet.

Thank you very much.

--Mark
.

Nov 17 '05 #2
Ram
Write the follwoing code in your code behind page. Change the outputstr as you need.

Dim outputstr As String
outputstr = "<html>" _
& vbCrLf & "<head>" _
& vbCrLf & "<title>Forms from code behind</title>" _
& vbCrLf & "</head>" _
& vbCrLf & "<frameset rows='108,*,22'>" _
& vbCrLf & "<frame name='Title' src='http://www.hotmail.com'>" _
& vbCrLf & "<frame name='body' src='http://www.hotmail.com'>" _
& vbCrLf & "<frame name='footer'src='http://www.hotmail.com'>" _
& vbCrLf & "</frameset>" _
& vbCrLf & "</html>"
Response.Write(outputstr)

In your ASPX page remove all the html content, and retain only the page directive.

Hope this helps you.

Ram

"Mark Kamoski" <mk******@yahoo.com> wrote in message news:<#x**************@TK2MSFTNGP12.phx.gbl>...
Hi--

I need a code sample of how to redirect from an ASP.NET page to a
frames-based html page and specifying what should load in the destination's
frames.

Any ideas?

(Even air-code is much appreciated.)

The long story is this. I have 2 sites. One is in DotNet and one is html
and frames. The DotNet site is a section by section rewrite of the html and
frames site. So the html site has 2 frames, one is the left nav and the
other is content. So, from the html site, I can simply point to a new
section that is in DotNet and the user goes to the DotNet site for that
section. Then, when in the DotNet site, if the user wants to go to a
section has NOT yet been rewritten in DotNet, then the DotNet nav needs to
send the user back to the html site and load the left nav and the correct
content. And so on.

If you can help, please post a code snippet.

Thank you very much.

--Mark

Nov 17 '05 #3

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

Similar topics

4
by: Simon Erikson | last post by:
Hello: I would like to build an app consisting of a "root" frame that can contain an arbitrary number of child frames (the user will click to create them). Each of these child frames needs the...
2
by: Lamine Darbouche | last post by:
Please help? I have my application with four frames and would like to redirect from one frame to _parent or _top. Can I do that with "Response.redirect" or similar? Many thanks in advance....
2
by: BoodieMan | last post by:
The second example doesnt show any borders between frames, but isn't complaiant with the WC3. The top one is compliant but shows the borders. I'd like to get the complaint one to not show any...
1
by: Com Dot | last post by:
In a frameset, the menu frame has six buttons. I would like to use mouseOver on these buttons to make images change in another frame. Does anyone have a script or know of a working site where this...
4
by: David Pendrey | last post by:
Hello all, I am using the WebBrowser control to browse a webpage containing frames and am having difficulties accessing the 'frames' property of a document object. Bellow is my code and the error...
5
by: MB | last post by:
Hello! I am using a frameset and vb codebehind to work with a database. When pressing a delete button in one of my frames, I want the hole application to be refreshed, or at least another of my...
2
by: news://news.microsoft.com/microsoft.public.de.germ | last post by:
Hallo! Ich habe ein Frameset mit 3 Frames. Im 1. Frame wird eine ASPX-Seite geöffnet. In dieser werden einige Steuerelemente angezeigt. Nun soll bei bestimmten Benutzeraktivitäten eine andere...
3
by: news | last post by:
I have a document that can contain any number of iframes which have further copies of the same document (and so on). In practice, we shouldn't ever have frames within frames, but I'd like to make...
27
by: Murray R. Van Luyn | last post by:
Hi, Is using frames in a website as big an issue nowadays as it was maybe 5 or so years ago? I can remember that you used to have to have a frame site, as well as a non frame site for browsers...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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.