How to Refresh my WebPage ?

E

Eddie

Hi All,

How may I refresh my page, for exemple, when the user click a
WebControls.Button on my form ? (Or on another frame ?)

Thx for your help !
 
E

Eddie

Yes, I will define my question...

I have a webpage with 3 frames.
- A header on the top (The header never change) (Frame 1)
- A Content frame (This frame contents menus with link on the left side of
the screen) (Frame 2)
- A Main Frame. (Frame 3)

First, I have a Login page (In the Main Frame) . When the user is logged
properly (with a user name) , I "read" his Full Name and his Application
Permissions from my Database. I Change the label.text in my Frame 2
(Content) and I hide some "Link" based on user's permissions.

My problem is that even if I change the label.text property and the
Link.Visible property on my Frame 2 (Content), the change to the properties
are not "visible" until the user click on the Refresh button of his
browser...

I would like to Refresh the "Content" frame when the user click the logon
button...

I understand that the "Main" frame is refreshed, but what about the others
frames ???


Also... If the Session.End event if fired, I want to be able to hide every
link on the Content Frame... How may I access the "content" frame from the
Event ???

Thx a lot for helping me...

Eddie





Kikoz said:
Hi,

Every click on Button control will initiate a PostBack unless your button
listens to some client event like "onclick='return false;'". It means your
page will be refreshed anyway. You probably need to define your question
with more details.
 
C

Curt_C [MVP]

hate to say this but lose the frames and use controls. Life will be MUCH
easier for you
 
G

Guest

Totally agree with Curt_C on this one. Lose your frames, man!! You'll end up with cleaner application with less bugs/problems/headaches/sleepless nights :) You need those frames only to have your header and links always visible even if the Main page has a lot of things with huge scroll bar, right? Well, believe us: no one of your visitors cares about that! Your header can be a simple include file if it's static or user control if it contains some logic. Your links got to be a user control or even server control if you need to reuse it in other projects. Creation of user control is far easier than maintaining jscripts that would take care of refreshing your frames. C# events will help your classes to communicate with one another during request life. There is no other way to do what you want other than client scripting simply because your frames are different requests with separate life cycles. They are three separate instanses of three separate classes as far as iis concerns. And you can control the flow of your logic only by talking to DOM in visitor's browser.
 
E

Eddie

Okay... I beleive you ! :eek:)
How may I Create a Server Control ?


Kikoz said:
Totally agree with Curt_C on this one. Lose your frames, man!! You'll end
up with cleaner application with less bugs/problems/headaches/sleepless
nights :) You need those frames only to have your header and links always
visible even if the Main page has a lot of things with huge scroll bar,
right? Well, believe us: no one of your visitors cares about that! Your
header can be a simple include file if it's static or user control if it
contains some logic. Your links got to be a user control or even server
control if you need to reuse it in other projects. Creation of user control
is far easier than maintaining jscripts that would take care of refreshing
your frames. C# events will help your classes to communicate with one
another during request life. There is no other way to do what you want other
than client scripting simply because your frames are different requests with
separate life cycles. They are three separate instanses of three separate
classes as far as iis concerns. And you can control the flow of your logic
only by talking to DOM in visitor's browser.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top