How to Use Master Pages and Site Navigation? Using Visual Studio 2008 Designer?
Master Pages is a feature coming in ASP.NET 2.0, which enables to create sites with a common appearance driven by a single template. You can create a single template page that can be used as a foundation for any number of ASP.NET content pages in your application.
Create a web site with a consistent layout and design across all its pages using ASP.NET 2.0 MasterPages. See how easy it is to add navigation to a web site using the new TreeView and SiteMapPath controls.
Using Menu and Navigation in visual studio watch more videos at ... MasterPages no Visual Studio 2008
Using Visual Studio 2008 Designer
The great thing in master pages in Visual Studio 2008 is that you can use the designer and switch to code as any .aspx page. For example for the following master page:
<%@ Master="" Language="C#" AutoEventWireup="true" CodeBehind="Site2.master.cs" Inherits="MasterPages.Site2" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<table cellpadding="3" border="1">
<tr bgcolor="yellow">
<td colspan="2">
<h1>My Home Page</h1>
</td>
</tr>
<tr>
<td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
</asp:ContentPlaceHolder>
</td>
<td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder4" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td colspan="2">
Copyright 2009
</td>
</tr>
</table>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Lets change the Default.aspx page as follow:
<%@ Page="" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MasterPages._Default" MasterPageFile="~/Site2.Master" %>
<asp:content ID="Content1" ContentPlaceHolderID="head" runat="server">
Default page
</asp:content>
<asp:content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
This is the content for the default page.
</asp:content>
<asp:content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
ContentPlaceHolder3
</asp:content>
<asp:content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder4" runat="server">
ContentPlaceHolder4
</asp:content>
Master Pages & Site Navigation Using Visual Studio 2008 Designer HTML JavaScript Dreamweaver Tutorial Working with Master Pages
Master Pages is a feature coming in ASP.NET 2.0, which enables to create sites with a common appearance driven by a single template. You can create a single template page that can be used as a foundation for any number of ASP.NET content pages in your application.
Create a web site with a consistent layout and design across all its pages using ASP.NET 2.0 MasterPages. See how easy it is to add navigation to a web site using the new TreeView and SiteMapPath controls.
Using Menu and Navigation in visual studio watch more videos at ... MasterPages no Visual Studio 2008
Using Visual Studio 2008 Designer
The great thing in master pages in Visual Studio 2008 is that you can use the designer and switch to code as any .aspx page. For example for the following master page:
<%@ Master="" Language="C#" AutoEventWireup="true" CodeBehind="Site2.master.cs" Inherits="MasterPages.Site2" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<table cellpadding="3" border="1">
<tr bgcolor="yellow">
<td colspan="2">
<h1>My Home Page</h1>
</td>
</tr>
<tr>
<td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder3" runat="server">
</asp:ContentPlaceHolder>
</td>
<td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder4" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
<tr>
<td colspan="2">
Copyright 2009
</td>
</tr>
</table>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Lets change the Default.aspx page as follow:
<%@ Page="" Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MasterPages._Default" MasterPageFile="~/Site2.Master" %>
<asp:content ID="Content1" ContentPlaceHolderID="head" runat="server">
Default page
</asp:content>
<asp:content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
This is the content for the default page.
</asp:content>
<asp:content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
ContentPlaceHolder3
</asp:content>
<asp:content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder4" runat="server">
ContentPlaceHolder4
</asp:content>
Master Pages & Site Navigation Using Visual Studio 2008 Designer HTML JavaScript Dreamweaver Tutorial Working with Master Pages
ASP.NET C# interview questions and answers
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
ASP.NET C# interview questions and answers
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
ASP.NET C# interview questions and answers
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
ASP.NET C# interview questions and answers
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
ASP.NET C# interview questions and answers
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?
1.Describe the difference between a Thread and a Process?
2.What is a Windows Service and how does its lifecycle differ from a standard EXE?
3.What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?
4.What is the difference between an EXE and a DLL?
5.What is strong-typing versus weak-typing? Which is preferred? Why?
6.What is wrong with a line like this? DateTime.Parse(myString)?
7.What are PDBs? Where must they be located for debugging to work?
8.What is cyclomatic complexity and why is it important?
9.Write a standard lock() plus double check to create a critical section around a variable access.
10.What is FullTrust? Do GAC’ed assemblies have FullTrust?
11.What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?
12.What does this do? gacutil /l | find /i “about”
13.What does this do? sn -t foo.dll
14.What ports must be open for DCOM over a firewall? What is the purpose of Port 135?
15.Contrast OOP and SOA. What are tenets of each
16.How does the XmlSerializer work? What ACL permissions does a process using it require?
17.Why is catch(Exception) almost always a bad idea?
18.What is the difference between Debug.Write and Trace.Write? When should each be used?
19.What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?
20.Does JITting occur per-assembly or per-method? How does this affect the working set?
21.Contrast the use of an abstract base class against an interface?
22.What is the difference between a.Equals(b) and a == b?
23.In the context of a comparison, what is object identity versus object equivalence?
24.How would one do a deep copy in .NET?
25.Explain current thinking around IClonable.
26.What is boxing?
27.Is string a value type or a reference type?