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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

MasterPage Variables

Posted By:      Posted Date: October 17, 2010    Points: 0   Category :ASP.Net

 I am using Visual Web Developer 2008 Express with C#.

I have a menu with 3 items defined on the MasterPage.

Is it possible to reference the menu items on the Master Page from one of the subpages.

If so, how do I do it.

I am new to Visual Web Developer and C#.


View Complete Post

More Related Resource Links

Temporary tables in SQL Server vs. table variables

When writing T-SQL code, you often need a table in which to store data temporarily when it comes time to execute that code. You have four table options: normal tables, local temporary tables, global temporary tables and table variables. I'll discuss the differences between using temporary tables in SQL Server versus table variables.

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.

Can IronPython use dynamic variables?


I am building a small application that can

1. Dynamically load 2 text boxes on a web form

2. Build a logic on those textboxes in IronPython to sum them and return the result.

3. I have already built a IPY script that does some opearions on a static text boxes. How to build a script on the dynamic textboxes?

Windows With C++: X64 Debugging With Pseudo Variables And Format Specifiers


This month we explain how pseudo variables and format specifiers provide a wealth of information for use in debugging.

Kenny Kerr

MSDN Magazine December 2008

Parser Error Message: Could not load type MasterPage File



Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'wamsilverlight.Web.Wam'.

Source Error:

Line 1:  <%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Wam.master.cs" Inherits="wamsilverlight.Web.Wam" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Source File: /Wam.Master    Line: 1

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927


All of the following have been tried over and over again:

1.) Delete all existing .dlls

2.) Delete MasterPage File and recreate it.

3.) Delete MasterPage perform a c

Setting webpage/masterpage background...image?


I want to have the background of my masterpage (the master page for all of my .aspx pages) have a sort of gradient.  I imagine the only way I can do that is with an image.  Or maybe even some other design, but I want to move away from the "solid color" background.

Is the easiest way to do this just to make an image and set that as the background?  What image size should I make it, because some users could possibly have the normal aspect ratio, or maybe a widescreen?  What should I make it like so that it looks good on all computers?

Thanks in advance. :) 

how can i use stylesheet file on pages that derives from masterpage


Hello. i use masterpage on my project. i want to add stylesheet file on pages that derives from masterpage. I add default.aspx page like this:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<link href="styles/salon.css" rel="s." type="text/css" />

But i can't see design page like this. It gives error like this:
Error 1 Cannot switch views: Validation (Internet Explorer 6): Element 'link' cannot be nested within element 'div'. 

i use IE7. Also how can i use jquery pages that derives from masterpage. Thanks...


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;

CSS Variables


HI Folks,

Does ASP.Net support CSS variables ?

I cannot write an @variables at rule in the css file. No such at-rule is supported.

Any help highly appreciated.

Thanks in advance,


Defining session variables...



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
          REQCURR = ""
     End If

End If


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

Any thoughts?


BinaryFormatter, SortedSet base class and a few instance variables.

/* This example successfully serializes and deserializes the SortedSet<string> base contents, but all the instance variables show up uninitialized. Here's the output: n1: 0 n2: 0 str: s == "String 1" s == "String 2" s == "String 3" Any ideas? */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Serialization; using System.IO; [Serializable] public class MyObject : SortedSet<string> {     public MyObject() : base() { }     protected MyObject(SerializationInfo info, StreamingContext context)         : base(info, context)     {     }     public int n1 = 0;     public int n2 = 0;     public String str = null; } namespace BasicBinarySerializationInheritanceFromSortedSet {     class BasicBinarySerializationInheritenaceFromSortedSetTest     {         static void Main(string[] args)         {             {                 MyObject obj = new MyObject();   &nb

HTML5 & Masterpage CSS

 I'm migrating my site to HTML5 and I got the home page, including the Masterpage, to work in the browsers. The problem is that when I go another page the CSS doesn't work on the page. All I get is a linearized page; any idea why this occuring? thx  

Enumerating Variables & Arguments in Rehosted Designer

I'm trying to enumerate the variables and arguments of a workflow after I load it into my rehosted designer.  I see that I can use ActivityMetadata.GetArgumentsWithReflection() and ActivityMetadata.GetVariablesWithReflection() but those require that I have ActivityMetadata to start with.  So the real question is, how do I get the ActivityMetadata once I've done MyWorkflowDesigner.Load(XamlPath);?Thanks in advance.ChuckChuck Berg | Consulting Engineer | Corporate IT - Station Casinos, Inc.

How to use variables in WCF as return in WCF GET properties?

Hi everyone,   I'm currently working on a project wherein i need to call a WCF web service. The web service has get_<method name> properties. those properties are working fine if the property has assigned a value within them. for example:   public String Description { get { return "Hello from SVC!!"; } }   ^ above will work fine when i call it on my client app.   but if i use a variable value as a return. it will not return the value of the variable (empty/blank). for example:   public class MYSVC : IMYSVC { private String varDescription; public void SetValue(String Description) { varDescription = "Test"; } public String Description { get { return varDescription; } }   ^above will not work. it will only return none.   Did i miss something? also just in case here's how a call those properties in the interface (fyi):       String Description    {        [OperationContract]        get;    }  

Need help to pass variables to Look UP

HI Guys we are using ssis 2008 I want to pass  the variables to look up for that I used partial cache Modify Sql statement when I click the parameters button I got an error  system runtime interopservices comexception what can I do to pass the variables start date and end date date ranges   Thanks in advance  
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