By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,606 Members | 2,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,606 IT Pros & Developers. It's quick & easy.

Redirecting a Frameset main page from the server side.

P: n/a
Would appreciate any solutions people could offer for this.

Basically I wan't to use a frameset with an aspx page as the contents
rather than a htm page and I'd like to be able to redirect the main page from
the code behind the contents page.

I want to do this to allow the use of asp "linkbuttons" instead of
hyperlinks so I can do a little processing before redirecting. The main
reason for this to prevent hyperlinks of pages that have been visited going
purple and instead just highlight the current page. (kinda petty I know but I
might be needing to do some more processing before redirecting in other areas
later in development so would be good to know now).

Is there a way to do this?

Thanks in anticipation.
Jul 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
I'd think that there is no way to achieve what you want directly from .aspx
code, however you could do a little Javascript workaround by writting
directly onto the response stream a
<script>window.top.location="<wherever-you-want-to-go-today>";</script> ...
and thus redirecting on the client side, only now your target frame is
"top" - the main browser window :]

It's been a while since I'd written any Javascript, so the actual code above
might not be 100% accurate, but the whole idea has been tried out with
success many times in the past :D

hope this helps a bit,

Angel
O:]
"lozd" <lo**@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
Would appreciate any solutions people could offer for this.

Basically I wan't to use a frameset with an aspx page as the contents
rather than a htm page and I'd like to be able to redirect the main page from the code behind the contents page.

I want to do this to allow the use of asp "linkbuttons" instead of
hyperlinks so I can do a little processing before redirecting. The main
reason for this to prevent hyperlinks of pages that have been visited going purple and instead just highlight the current page. (kinda petty I know but I might be needing to do some more processing before redirecting in other areas later in development so would be good to know now).

Is there a way to do this?

Thanks in anticipation.

Jul 21 '05 #2

P: n/a
hi....

this should work for you...
in the click even for the link button just stream the javascript to the
response output.

Response.Write("<script>window.open('login.aspx',' _top');<script>");

Regds
Kannan.V

"lozd" wrote:
Would appreciate any solutions people could offer for this.

Basically I wan't to use a frameset with an aspx page as the contents
rather than a htm page and I'd like to be able to redirect the main page from
the code behind the contents page.

I want to do this to allow the use of asp "linkbuttons" instead of
hyperlinks so I can do a little processing before redirecting. The main
reason for this to prevent hyperlinks of pages that have been visited going
purple and instead just highlight the current page. (kinda petty I know but I
might be needing to do some more processing before redirecting in other areas
later in development so would be good to know now).

Is there a way to do this?

Thanks in anticipation.

Jul 21 '05 #3

P: n/a
Thanks a lot, (to both posters) that did the trick.

Cheers
lozd

"Kannan.V" wrote:
hi....

this should work for you...
in the click even for the link button just stream the javascript to the
response output.

Response.Write("<script>window.open('login.aspx',' _top');<script>");

Regds
Kannan.V

"lozd" wrote:
Would appreciate any solutions people could offer for this.

Basically I wan't to use a frameset with an aspx page as the contents
rather than a htm page and I'd like to be able to redirect the main page from
the code behind the contents page.

I want to do this to allow the use of asp "linkbuttons" instead of
hyperlinks so I can do a little processing before redirecting. The main
reason for this to prevent hyperlinks of pages that have been visited going
purple and instead just highlight the current page. (kinda petty I know but I
might be needing to do some more processing before redirecting in other areas
later in development so would be good to know now).

Is there a way to do this?

Thanks in anticipation.

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.