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

Frames refresh

2
Hi all, I am a beginner at ASP.NET C# programming. I am developing my first project and I came to a problem:
I have one default.htm and two frames in it:

<frameset border="0" frameborder="0" framespacing="0" cols="20%,80%">
<frame name="left" scrolling=no src="OnlineUsers.aspx"/>
<frame name="main" src="LogIn.aspx"/>
</frameset>

The "left" is static. The "main" web form is a log in form. After the user is loged in, he/she is redirected to a game form - game.aspx. Unfortunately when I refresh the default.htm , just pressing F5, the LogIn.aspx is loaded and the user should log in again.
How could I avoid this reloading the frames?
Mar 11 '07 #1
1 1376
hini
23
the best way to deal with it is to use a session variable,
you can initiate it in global.asax.
Expand|Select|Wrap|Line Numbers
  1. session("mode") = "notloggedin" ;
  2.  
and place a code on the top of login.aspx, something like

Expand|Select|Wrap|Line Numbers
  1. if (session("mode")="loggedin")
  2. response.redirect ....
  3.  
and in login.aspx, if the user and pass are correct, u must add a line like
Expand|Select|Wrap|Line Numbers
  1. session("mode")="loggedin"
  2.  
I believe this is the easiest way.
don't copy paste the code because probably it may have syntax errors.
and the idea was not clear for you, I recommend reading about session variables.
Mar 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jawahar Rajan | last post by:
All, I have an ASP site that uses frames two frames. (yes I should be using include files, but we started ou using frames so we have been stuck with frames.) When I get a page expired warning...
10
by: Conax | last post by:
Hi there, My boss is hoping that I can come up with a page that displays some information. The information will always be displayed on specific part of the page, with auto refresh. But he...
1
by: Phoenix | last post by:
I have a site that is supposed to be 'real-time' which has a frameset of 2 rows (the bottom row is 1 pixel so essentially invisible to IE users which is the requirement for the product). The bottom...
3
by: Mark | last post by:
Hi, I don't know if I'm just missing something obvious, but when running my app, not matter what page I'm on, when I hit 'refresh' on my browser, it takes me back to my homepage. I'm using...
8
by: Judy Ward | last post by:
I have an index.aspx with frames. The top frame has a navigation bar with a "Login" hyperlink. If the user has already logged in I want this link to change to "Logout". I am using forms-based...
1
by: Sachin Kuchinad | last post by:
Hi, I am using Smart Navigation to avoid screen flashes during refresh / reload of web pages which are under frames. Following is the physical layout of pages and their attributes. Main.aspx...
6
by: Doug | last post by:
I'm about to go nuts. I've got a VB.NET web app , utilizing frames(my 1st mistake). One of the frames is hidden and does a behind the scenes refresh, to keep the session alive. This works great...
6
by: Bob | last post by:
Hi All, Is the following possible, and if so could someone show me some example code please :o) I have a web page with several iframes, and I want to be able to refresh them only not the...
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: 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:
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.