473,394 Members | 1,797 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,394 software developers and data experts.

Frames and response.redirect

Hi,
I really need som help here.
I have read a lot of thread about Frames ans response.redirect and I know by
now that I cannot use response redirect and I have to use "some kind of
javascript on the client side" according to a lot of answers. The only
answers that have some code did not seem to work with my code?

I have a login page (with no frame) and when the program accepts the login
the page is redirected to a page with 3 frames. On the header frame there is
a logout button. In the codebehind I am suppose to abandon the session and to
redirect to the Login page (the one with no frames). Here is the code behind
the logout button:
FormsAuthentication.SignOut()
Session.Abandon()
<Here I am suppose to redirect to the login page>

How Can I solve this problem?
Can anybody help me?

Thanks
PKin
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200510/1
Nov 19 '05 #1
3 2271
I have no idea if this works, but i would think that it would. With that
said, you said that you have to use javascript to change go to wherever it
is you need to go. Couldn't you do something like the following? -

FormsAuthentication.SignOut()
Session.Abandon()
Response.Write(script)

where script would be a string of something like
"<script>window.location.href = bla</script>". (I don't know what the
javascript for the command would be so I doubt what i put would work).

I would think that that would work, but again I don't know for sure. Just
an idea.

-Darren Kopp
http://blog.secudocs.com/
"PKin via DotNetMonster.com" <u10324@uwe> wrote in message
news:5595d79be947c@uwe...
Hi,
I really need som help here.
I have read a lot of thread about Frames ans response.redirect and I know
by
now that I cannot use response redirect and I have to use "some kind of
javascript on the client side" according to a lot of answers. The only
answers that have some code did not seem to work with my code?

I have a login page (with no frame) and when the program accepts the login
the page is redirected to a page with 3 frames. On the header frame there
is
a logout button. In the codebehind I am suppose to abandon the session and
to
redirect to the Login page (the one with no frames). Here is the code
behind
the logout button:
FormsAuthentication.SignOut()
Session.Abandon()
<Here I am suppose to redirect to the login page>

How Can I solve this problem?
Can anybody help me?

Thanks
PKin
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200510/1

Nov 19 '05 #2
This can only be done by using Java script on the client side.

In the page displaying in the header frame do the following:
Up top in the class declare a variable to be used by the Java script,
something like:
Protected m_TargetPageTxt As String = ""
In the postback code of the Logout button, do your stuff, BUT instead of
re-direct, insert the following statement, telling the Java script to
re-direct:
m_TargetPageTxt = "LoginForm.aspx"
Note - use the name of your login form.

In the page itself displaying in the header frame, go into HTML view and
right at the bottom paste this Java script
<script language="javascript">
var TargetPageTxt = '<%=m_TargetPageTxt%>';
if (TargetPageTxt != "") {
window.top.navigate(TargetPageTxt);
}
</script>
"PKin via DotNetMonster.com" <u10324@uwe> wrote in message
news:5595d79be947c@uwe...
Hi,
I really need som help here.
I have read a lot of thread about Frames ans response.redirect and I know
by
now that I cannot use response redirect and I have to use "some kind of
javascript on the client side" according to a lot of answers. The only
answers that have some code did not seem to work with my code?

I have a login page (with no frame) and when the program accepts the login
the page is redirected to a page with 3 frames. On the header frame there
is
a logout button. In the codebehind I am suppose to abandon the session and
to
redirect to the Login page (the one with no frames). Here is the code
behind
the logout button:
FormsAuthentication.SignOut()
Session.Abandon()
<Here I am suppose to redirect to the login page>

How Can I solve this problem?
Can anybody help me?

Thanks
PKin
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200510/1

Nov 19 '05 #3
Hi Chris,
Your solution works very nice. Thanks.

Pkin
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200510/1
Nov 19 '05 #4

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

Similar topics

2
by: quitaxe | last post by:
hi i am facing this problem when i redirect to a asp page using - Response.redirect "mynext.asp" the problem is that the current page is using frames so this mynext.asp is also getting loaded...
5
by: Filip Matošić | last post by:
I ha a login page which has no frames, and when a user logs in, i set a session variable ( session("userlogged")=true to true, then the page redirects the user to a page with frames(3 frames) in...
3
by: Steve | last post by:
I have a page which has some frames. After processing one of the pages I want to redirect to another frameset. However, when I use Response.Redirect I end up with a frameset with the frameset...
0
by: headware | last post by:
I have a question about how best to implement a redirection to a framed version of a web site. Basically I have a web site that was originally implemented without frames. Then it was decided that...
2
by: Mark Kamoski | last post by:
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...
3
by: Greg Smith | last post by:
I am trying to create a FrontPage web site that uses aspx pages I created with VS. I am having fits trying to aspx pages to appear in a frame. Am I trying to do the impossible or am I just...
1
by: sf2005 | last post by:
VS .Net 2003 / Visual Basic I have this html frames page. The header and main frames show aspx pages. In the header, if I have a button to get the user back to the main menu, how do I close the...
2
by: pete K | last post by:
I'm sure this is something simple that I'm missing, but here's my problem. I have two frames. <frameset> <frame name="rtop" src="something1.aspx"> <frame name="rbottom" src="something2.aspx">...
2
by: Charles A. Lackman | last post by:
Hello, I have an ASPX page that is storing data into a session Variable: Session("Name") = "Chuck" When the User clicks "Next" on the page, it naviages to "Details.aspx", Details.aspx has two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...
0
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...

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.