.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

session variables and master pages

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
 
Hi all: I have a master page and 2 content pages. In the master page I use a session variable. As it, I suppose this session variable is read by the two content pages. But it isn't working. This session variable is read by the first content page and not the second. Why? Thanks in advance if you can help me      


View Complete Post


More Related Resource Links

Session variables value lost between pages

  

Hello,

          I am using Session ID Manager in all the pages of the website, but I am losing session variables in between the pages. what should I do to save the values of session variables.


Thank you

Regards

Anoop


Why do session variables disappear on redirect between pages in IFrame?

  

I have a web site A with IFrame linked to web site B. A and B are located on different servers. B site has several pages (BHome, B1, B2).
When B site redirects from BHome page to Bx all session variables get cleared.

I can’t find why all session variables disappear.


Do you have any ideas?


Master Pages in MOSS 2007

  
'MasterPages' feature in sharepoint 2007 makes the entire customization job easy.In 2003 we used to face lot of issues to get the same look and feel and the standard behaviour for overall site. In 2007, customizing the look and feel for the entire site can be done in a simple way by using 'MasterPage' feature.

Session and Application Variables

  

I have a web application in which i need to logout the user if he clicks the logout button or even if he closes his browser window. On Logout button click, i am doing session.Abandon(), but how to go about his browser window close.

Can anybody help with a code sample.


Master Pages: Master Your Site Design with Visual Inheritance and Page Templates

  

Master pages in ASP.NET 2.0 solve a problem many Web developers have been solving on their own with a variety of techniques for years - providing a single master template for an entire site. This article covers the details of master pages, discussing their usage and implementation and how they are a natural evolution of custom techniques developers are using today.

Fritz Onion

MSDN Magazine June 2004


Button click in master page use in other pages I have to click twice. Why?

  

In my masterpage I have a menu with buttons. I want the buttons to do something after click. It works but I have to click twice on the button, why? What do I have to do to just to click once?



how to change default menu tab in master pages?

  

Folks,

i have 5 tabs in my master page application. how can i make 2nd tab as default?

any ideas?

Thanks 


Ajax and master pages

  

I have a site that uses master pages.  Some of my pages use ajax, so they have the scriptmanager on them.  I now have to add some ajax to one of the master pages.  When I try to display a page that already has a script manager on it, I get an error that I can only have one script manager.  Is there a way to deal with this other then searching for every page that uses the master page and ajax and removing the scriptmanager tag? 

I'm hoping to start using Ajax more and more, so I'm really more concerned with best practices then I am about having to find and remove tags.  What is the right way to use Ajax on master pages and some, but not all content pages?


Why do the aks master pages not get applied if the feature is not activated on the top site collecti

  
Hi

I installed AKS 2.0 and activated AKS feature. The problem I found was the aks master pages do not get applied if the feature is not activated on the top site collection. why is so?

example: If i activate the feature on http://<servername>/sites/<sitename> and apply the master page, I dont see any changes.

              But if i activate the same aks feature on http://<servername/ then everything started working on all sites.

              The reason i found is the CSS reference in the aks master pages.

              It reference should be given as follows:

                 for http://<servername>/sites/<sitename> ->  <link rel="stylesheet" type="text/css" href="../../Style%20Library/AKS/Aks_Band_Blueband.css"/>

                 for http://<servername>/ -><link rel="stylesheet" type="text/css" href="/Style%20Library/AKS/Aks_Band_Blueband.css"/>

So my question is, am i missing anything? am i supposed to activate the AKS feature on top level site collection at any cost? if yes, why is so? 

And after applying aks master pages, i see differnece in font sizes. Why the font size is getting changed?

Also

Sharepoint 2007 - Wiki site - New Pages Not Inheriting Custom Master Page

  

I am working on a SP site (MOSS not WSS) which is heavily customised away from the OOTB layout. I need to create a Wiki site, which was going well - I've created a master page which displays the miniconsole (this was not visible with our customised layout), and made it the default master page for the site. This has been applied to the two standard pages that come with the Wiki site, however when a new page is created, it seems to inherit the default.master, rather than my custom master page - thus not showing the miniconsole.

When I have created a new page, I am able to use SharePoint Designer to attach my custom master page to it, which works perfectly, however this will not be a viable option going forward as end-users create their new wiki pages.

How can I get the new pages to inherit my master page when they are created?

Shark


Inherit from multiple master pages

  

How does one inherit from multiple master pages?

 

I.e.  I have a base master page that contains several ContentPlaceHolders.

 

Base

{

ContentPlaceHolder_A

ContentPlaceHolder_B

ContentPlaceHolder_C

}

 

I want to have separate master page files (one for each ContentPlaceHolder) so that I have 4 separate files: 3 ContentPlaceHolders (each adding specific content) and 1 base master page.

The ASPX files will then inherit from the base master page.

 

-X


Programmatically Hide Master Pages from Site Master Page Settings page?

  

Hi,

I know there is a field you can check when you edit the properties of a Master Page in the Master Page Gallery to set a Master Page to hidden but ... can anyone think of a way to programmatically hide specific Master Pages from the Site Master Page Settings page?

Maybe this should be two questions:

  1. How do I programmatically access a Master Page in a Master Page Gallery?
  2. Is there a property that can be set that will hide the page from the Site Master Page Settings page?

ASP.NET MVC 2 - I have a serious concern about the management of session variables.

  

I have a serious concern about the management of session variables.
I state that I have Windows Web Server 2008.
Currently values in the controller and call a session variable like this:
I have an action in as:
System.Web.HttpContext.Current.Session ['name'] = id_userlogged;

Defining session variables...

  

Hello,

This is a pretty basic question.

I have some code where I need to define a session variable  however it's coming back as Nothing when the code is executed. Here's the code:

' Default Currency

REQCURR = Request.Querystring("p_DCURR")
'If not explicitly specified, try to get it from session

If (REQCURR = "") Then

     If (Session("REQCURR") <> "") Then
          REQCURR = Session("REQCURR")

          'Here is the session variable I'm trying to define:
          Session("REQCAD") = 0
     Else
          REQCURR = ""
     End If

End If

Session("REQCURR") = REQCURR

So, for some reason that Session("REQCAD") = 0 has no value instead of having a value of 0.

Any thoughts?

Thanks


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend