views:

122

answers:

2

Hi, I have a web site that contains Master Pages as follows:

ApplicationFolder

  • Root.Master
  • User Folder
    • User.Master inherited from Root.Master
    • Data.aspx inherited from User.Master In Root.Master Page

There is a ScriptManager control I put to Root.Master in case I can use updatepanel in any page.

There is LoginView which any user can have a menu to control settings.
In Data.aspx page there is a gridview in updatepanel whose UpdateMode is set to Conditional.Programmatically,I control update panel to update , there is no error for incoming data or data manipulation.

I also imply that there is no updatepanel on root pages.

My question is why Data.aspx (or any) page does not redirect to login page when user clicks on logout link in LoginView (which is in Master page) ??

A: 

Are you trying to do the redirect in a callback or postback? Redirects don't work in callbacks.

Chris Lively
I think It should be a postback.But I wonder what my mistake is ??
Myra
Maybe I misunderstood the question. Are you saying that the link is outside of any update panels? If so, what does it link to?
Chris Lively
Yes,why should I need a update panel if loginview is only working for user to navigate between pages. It is a simple LoginStatus control that enables user to logout,more accordingly,it a simple link.
Myra
You shouldn't need an update panel at all. I'd start with creating a simple page with the LoginStatus control. When that works, create a new master page with it and another simple page which uses that master... Keep going until you hit the problem. This one is weird.
Chris Lively
A: 

This error occured from a javascipt code

$('a').click(function(e){
   e.preventDefault();
});

Because , I wanted to have client side anchors to act like to do nothing. In default manner,when any anchor clicked,page goes to top side.

Page still does but problem I mentioned is solved.

Myra