Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2011, 11:27 AM
Authorized User
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default Chp 6 code Problem

Imar

Will you please look at this code for it looks right per book and download. The problem is at browser time I get this: Compiler Error Message: CS1518: Expected class, delegate, enum, interface, or struct


using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MasterPages_Frontend : System.Web.UI.MasterPage
{
protected void Page_Load( object sender , EventArgs e )
{
if (!Page.IsPostBack )
{
string selectedTheme = Page.Theme;
HttpCookie preferredTheme = Request.Cookies.Get("PreferredTheme");
if (preferredTheme != null )
{
selectedTheme = preferredTheme .Value;
}
if (!string.IsNullOrEmpty( selectedTheme) &&
ThemeList.Items.FindByValue(selectedTheme) != null )
{
ThemeList.Items.FindByValue(selectedTheme) .Selected=true;
}
}
switch (Page.Theme.ToLower())
{
case "darkgray":
Menu1.Visible = false;
TreeView1.Visible = true;
break;
default:
Menu1.Visible = true;
TreeView1.Visible = false;
break;

}
}
}
protected void ThemeList_SelectedIndexChanged( object sender , EventArgs e )
{
HttpCookie preferredTheme = newHttpCookie("PreferredTheme");
preferredTheme.Expires = DateTime.Now.AddMonths(3);
preferredTheme.Value = ThemeList.SelectedValue;
Response.Cookies.Add( preferredTheme);
Response.Redirect( Request.Url.ToString ( ));
}
 
Old December 7th, 2011, 03:15 PM
Friend of Wrox
 
Join Date: Apr 2010
Posts: 125
Thanks: 20
Thanked 3 Times in 3 Posts
Default

Hi ,
Can you elaborate more in details?
This code is your own code or book source code?
Can you paste full error details?
__________________
Please excuse me for poor and bad English.

Last edited by morteza; December 7th, 2011 at 03:19 PM..
 
Old December 7th, 2011, 03:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Looks like you're missing a curly brace (}) at the end of the code. The last one closes off thhe method, but you also need one for the class.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 7th, 2011, 04:13 PM
Authorized User
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default Code Problem

Imar

protected void ThemeList_SelectedIndexChanged( object sender , EventArgs e )

Error 1 Expected class, delegate, enum, interface, or struct C:\BeginASP.NET\WebSite\MasterPages\Frontend.maste r.cs 40 15 C:\BeginASP.NET\WebSite\

protected void ThemeList_SelectedIndexChanged( object sender , EventArgs e )
{
HttpCookie preferredTheme = newHttpCookie("PreferredTheme");
preferredTheme.Expires = DateTime.Now.AddMonths(3);
preferredTheme.Value = ThemeList.SelectedValue;
Response.Cookies.Add( preferredTheme);
Response.Redirect( Request.Url.ToString ( ));
}
}

Error 2 Type or namespace definition, or end-of-file expected C:\BeginASP.NET\WebSite\MasterPages\Frontend.maste r.cs 48 1 C:\BeginASP.NET\WebSite\
 
Old December 7th, 2011, 04:18 PM
Authorized User
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default Code Problem

Imar


Here is the rest of the compilation error.

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1518: Expected class, delegate, enum, interface, or struct

Source Error:



Line 38: }
Line 39: }
Line 40: protected void ThemeList_SelectedIndexChanged( object sender , EventArgs e )
Line 41: {
Line 42: HttpCookie preferredTheme = newHttpCookie("PreferredTheme");


Source File: c:\BeginASP.NET\WebSite\MasterPages\Frontend.maste r.cs Line: 40



Show Detailed Compiler Output:


C:\Program Files\Common Files\Microsoft Shared\DevServer\10.0> "C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc .exe" /t:library /utf8output /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\T emporary ASP.NET Files\root\ec921a97\92a61567\App_Code.8hw0mupi.dll " /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Data.Linq\v4.0_4.0.0.0__b77a5c561934e089\System .Data.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31 bf3856ad364e35\System.ComponentModel.DataAnnotatio ns.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System .Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.d ll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System .Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll " /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c5619 34e089\System.Data.DataSetExtensions.dll" /R:"C:\Windows\Microsoft.NET\Framework\v4.0.30319\m scorlib.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core .dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\Sy stem.IdentityModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\ System.Web.DynamicData.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856a d364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856a d364e35\System.ServiceModel.Activation.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856a d364e35\System.Web.ApplicationServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\Sys tem.ServiceModel.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\Sy stem.Configuration.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\S ystem.Web.Extensions.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Runtime.Serialization\v4.0_4.0.0.0__b77a5c56193 4e089\System.Runtime.Serialization.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.d ll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35 \System.ServiceModel.Web.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Micr osoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Micros oft.CSharp.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.D rawing.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.WebPages.Deployment\v4.0_1.0.0.0__31bf3856a d364e35\System.Web.WebPages.Deployment.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\Sys tem.Web.Services.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System. Xml.Linq.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Activities\v4.0_4.0.0.0__31bf3856ad364e35\Syste m.Activities.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_32\System .EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a \System.EnterpriseServices.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.Web.Entity\v4.0_4.0.0.0__b77a5c561934e089\Syste m.Web.Entity.dll" /R:"C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Syst em.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35 \System.WorkflowServices.dll" /out:"C:\Windows\Microsoft.NET\Framework\v4.0.30319 \Temporary ASP.NET Files\root\ec921a97\92a61567\App_Web_d1h5rfre.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Tem porary ASP.NET Files\root\ec921a97\92a61567\App_Web_d1h5rfre.0.cs " "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Tem porary ASP.NET Files\root\ec921a97\92a61567\App_Web_d1h5rfre.1.cs " "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Tem porary ASP.NET Files\root\ec921a97\92a61567\App_Web_d1h5rfre.2.cs "


Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.

c:\BeginASP.NET\WebSite\MasterPages\Frontend.maste r.cs(40,15): error CS1518: Expected class, delegate, enum, interface, or struct
c:\BeginASP.NET\WebSite\MasterPages\Frontend.maste r.cs(48,1): error CS1022: Type or namespace definition, or end-of-file expected





Show Complete Compilation Source:


Line 1: #pragma checksum "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "1256D26D5F4E5303359C0D450B13ABC7"
Line 2: //------------------------------------------------------------------------------
Line 3: // <auto-generated>
Line 4: // This code was generated by a tool.
Line 5: // Runtime Version:4.0.30319.488
Line 6: //
Line 7: // Changes to this file may cause incorrect behavior and will be lost if
Line 8: // the code is regenerated.
Line 9: // </auto-generated>
Line 10: //------------------------------------------------------------------------------
Line 11:
Line 12:
Line 13:
Line 14: public partial class MasterPages_Frontend {
Line 15:
Line 16:
Line 17: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 18: protected global::System.Web.UI.WebControls.ContentPlaceHold er ContentPlaceHolder1;
Line 19:
Line 20: #line default
Line 21: #line hidden
Line 22:
Line 23:
Line 24: #line 7 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 25: protected global::System.Web.UI.HtmlControls.HtmlHead Head;
Line 26:
Line 27: #line default
Line 28: #line hidden
Line 29:
Line 30:
Line 31: #line 17 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 32: protected global::System.Web.UI.WebControls.Menu Menu1;
Line 33:
Line 34: #line default
Line 35: #line hidden
Line 36:
Line 37:
Line 38: #line 21 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 39: protected global::System.Web.UI.WebControls.SiteMapDataSourc e SiteMapDataSource1;
Line 40:
Line 41: #line default
Line 42: #line hidden
Line 43:
Line 44:
Line 45: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 46: protected global::System.Web.UI.WebControls.TreeView TreeView1;
Line 47:
Line 48: #line default
Line 49: #line hidden
Line 50:
Line 51:
Line 52: #line 32 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 53: protected global::System.Web.UI.WebControls.ContentPlaceHold er cpMainContent;
Line 54:
Line 55: #line default
Line 56: #line hidden
Line 57:
Line 58:
Line 59: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 60: protected global::System.Web.UI.WebControls.DropDownList ThemeList;
Line 61:
Line 62: #line default
Line 63: #line hidden
Line 64:
Line 65:
Line 66: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 67: protected global::System.Web.UI.HtmlControls.HtmlForm form1;
Line 68:
Line 69: #line default
Line 70: #line hidden
Line 71:
Line 72: protected System.Web.Profile.DefaultProfile Profile {
Line 73: get {
Line 74: return ((System.Web.Profile.DefaultProfile)(this.Context. Profile));
Line 75: }
Line 76: }
Line 77:
Line 78: protected System.Web.HttpApplication ApplicationInstance {
Line 79: get {
Line 80: return ((System.Web.HttpApplication)(this.Context.Applica tionInstance));
Line 81: }
Line 82: }
Line 83: }
Line 84: namespace ASP {
Line 85:
Line 86: #line 336 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 87: using System.Linq;
Line 88:
Line 89: #line default
Line 90: #line hidden
Line 91:
Line 92: #line 332 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 93: using System.Collections.Generic;
Line 94:
Line 95: #line default
Line 96: #line hidden
Line 97:
Line 98: #line 349 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 99: using System.Xml.Linq;
Line 100:
Line 101: #line default
Line 102: #line hidden
Line 103:
Line 104: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 105: using System.Web.UI.WebControls;
Line 106:
Line 107: #line default
Line 108: #line hidden
Line 109:
Line 110: #line 339 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 111: using System.Web;
Line 112:
Line 113: #line default
Line 114: #line hidden
Line 115:
Line 116: #line 330 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 117: using System;
Line 118:
Line 119: #line default
Line 120: #line hidden
Line 121:
Line 122: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 123: using System.Web.UI;
Line 124:
Line 125: #line default
Line 126: #line hidden
Line 127:
Line 128: #line 348 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 129: using System.Web.UI.HtmlControls;
Line 130:
Line 131: #line default
Line 132: #line hidden
Line 133:
Line 134: #line 343 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 135: using System.Web.Security;
Line 136:
Line 137: #line default
Line 138: #line hidden
Line 139:
Line 140: #line 338 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 141: using System.Text.RegularExpressions;
Line 142:
Line 143: #line default
Line 144: #line hidden
Line 145:
Line 146: #line 335 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 147: using System.Configuration;
Line 148:
Line 149: #line default
Line 150: #line hidden
Line 151:
Line 152: #line 334 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 153: using System.ComponentModel.DataAnnotations;
Line 154:
Line 155: #line default
Line 156: #line hidden
Line 157:
Line 158: #line 337 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 159: using System.Text;
Line 160:
Line 161: #line default
Line 162: #line hidden
Line 163:
Line 164: #line 344 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 165: using System.Web.Profile;
Line 166:
Line 167: #line default
Line 168: #line hidden
Line 169:
Line 170: #line 340 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 171: using System.Web.Caching;
Line 172:
Line 173: #line default
Line 174: #line hidden
Line 175:
Line 176: #line 331 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 177: using System.Collections;
Line 178:
Line 179: #line default
Line 180: #line hidden
Line 181:
Line 182: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 183: using System.Web.UI.WebControls.WebParts;
Line 184:
Line 185: #line default
Line 186: #line hidden
Line 187:
Line 188: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 189: using System.Web.UI.WebControls.Expressions;
Line 190:
Line 191: #line default
Line 192: #line hidden
Line 193:
Line 194: #line 333 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 195: using System.Collections.Specialized;
Line 196:
Line 197: #line default
Line 198: #line hidden
Line 199:
Line 200: #line 342 "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Con fig\web.config"
Line 201: using System.Web.SessionState;
Line 202:
Line 203: #line default
Line 204: #line hidden
Line 205:
Line 206: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 207: using System.Web.DynamicData;
Line 208:
Line 209: #line default
Line 210: #line hidden
Line 211:
Line 212:
Line 213: [System.Runtime.CompilerServices.CompilerGlobalScop eAttribute()]
Line 214: public class masterpages_frontend_master : global::MasterPages_Frontend {
Line 215:
Line 216: private System.Web.UI.ITemplate @__Template_ContentPlaceHolder1;
Line 217:
Line 218: private System.Web.UI.ITemplate @__Template_cpMainContent;
Line 219:
Line 220: private static bool @__initialized;
Line 221:
Line 222: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 223: public masterpages_frontend_master() {
Line 224:
Line 225: #line 912304 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er.cs"
Line 226: ((global::System.Web.UI.MasterPage)(this)).AppRela tiveVirtualPath = "~/MasterPages/Frontend.master";
Line 227:
Line 228: #line default
Line 229: #line hidden
Line 230: if ((global::ASP.masterpages_frontend_master.@__initi alized == false)) {
Line 231: global::ASP.masterpages_frontend_master.@__initial ized = true;
Line 232: }
Line 233: this.ContentPlaceHolders.Add("contentplaceholder1" );
Line 234: this.ContentPlaceHolders.Add("cpmaincontent");
Line 235: }
Line 236:
Line 237: [TemplateContainer(typeof(System.Web.UI.MasterPage) )]
Line 238: [TemplateInstanceAttribute(System.Web.UI.TemplateIn stance.Single)]
Line 239: public virtual System.Web.UI.ITemplate Template_ContentPlaceHolder1 {
Line 240: get {
Line 241: return this.@__Template_ContentPlaceHolder1;
Line 242: }
Line 243: set {
Line 244: this.@__Template_ContentPlaceHolder1 = value;
Line 245: }
Line 246: }
Line 247:
Line 248: [TemplateContainer(typeof(System.Web.UI.MasterPage) )]
Line 249: [TemplateInstanceAttribute(System.Web.UI.TemplateIn stance.Single)]
Line 250: public virtual System.Web.UI.ITemplate Template_cpMainContent {
Line 251: get {
Line 252: return this.@__Template_cpMainContent;
Line 253: }
Line 254: set {
Line 255: this.@__Template_cpMainContent = value;
Line 256: }
Line 257: }
Line 258:
Line 259: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 260: private global::System.Web.UI.HtmlControls.HtmlTitle @__BuildControl__control2() {
Line 261: global::System.Web.UI.HtmlControls.HtmlTitle @__ctrl;
Line 262:
Line 263: #line 8 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 264: @__ctrl = new global::System.Web.UI.HtmlControls.HtmlTitle();
Line 265:
Line 266: #line default
Line 267: #line hidden
Line 268: return @__ctrl;
Line 269: }
Line 270:
Line 271: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 272: private global::System.Web.UI.WebControls.ContentPlaceHold er @__BuildControlContentPlaceHolder1() {
Line 273: global::System.Web.UI.WebControls.ContentPlaceHold er @__ctrl;
Line 274:
Line 275: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 276: @__ctrl = new global::System.Web.UI.WebControls.ContentPlaceHold er();
Line 277:
Line 278: #line default
Line 279: #line hidden
Line 280: this.ContentPlaceHolder1 = @__ctrl;
Line 281:
Line 282: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 283: @__ctrl.ID = "ContentPlaceHolder1";
Line 284:
Line 285: #line default
Line 286: #line hidden
Line 287: if ((this.ContentTemplates != null)) {
Line 288: this.@__Template_ContentPlaceHolder1 = ((System.Web.UI.ITemplate)(this.ContentTemplates["ContentPlaceHolder1"]));
Line 289: }
Line 290: if ((this.@__Template_ContentPlaceHolder1 != null)) {
Line 291: this.InstantiateInContentPlaceHolder(@__ctrl, this.@__Template_ContentPlaceHolder1);
Line 292: }
Line 293: else {
Line 294: System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
Line 295:
Line 296: #line 9 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 297: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n "));
Line 298:
Line 299: #line default
Line 300: #line hidden
Line 301: }
Line 302: return @__ctrl;
Line 303: }
Line 304:
Line 305: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 306: private global::System.Web.UI.HtmlControls.HtmlHead @__BuildControlHead() {
Line 307: global::System.Web.UI.HtmlControls.HtmlHead @__ctrl;
Line 308:
Line 309: #line 7 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 310: @__ctrl = new global::System.Web.UI.HtmlControls.HtmlHead("head" );
Line 311:
Line 312: #line default
Line 313: #line hidden
Line 314: this.Head = @__ctrl;
Line 315:
Line 316: #line 7 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 317: @__ctrl.ID = "Head";
Line 318:
Line 319: #line default
Line 320: #line hidden
Line 321: global::System.Web.UI.HtmlControls.HtmlTitle @__ctrl1;
Line 322:
Line 323: #line 7 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 324: @__ctrl1 = this.@__BuildControl__control2();
Line 325:
Line 326: #line default
Line 327: #line hidden
Line 328: System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
Line 329:
Line 330: #line 7 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 331: @__parser.AddParsedSubObject(@__ctrl1);
Line 332:
Line 333: #line default
Line 334: #line hidden
Line 335: global::System.Web.UI.WebControls.ContentPlaceHold er @__ctrl2;
Line 336:
Line 337: #line 7 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 338: @__ctrl2 = this.@__BuildControlContentPlaceHolder1();
Line 339:
Line 340: #line default
Line 341: #line hidden
Line 342:
Line 343: #line 7 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 344: @__parser.AddParsedSubObject(@__ctrl2);
Line 345:
Line 346: #line default
Line 347: #line hidden
Line 348: return @__ctrl;
Line 349: }
Line 350:
Line 351: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 352: private global::System.Web.UI.HtmlControls.HtmlAnchor @__BuildControl__control3() {
Line 353: global::System.Web.UI.HtmlControls.HtmlAnchor @__ctrl;
Line 354:
Line 355: #line 15 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 356: @__ctrl = new global::System.Web.UI.HtmlControls.HtmlAnchor();
Line 357:
Line 358: #line default
Line 359: #line hidden
Line 360:
Line 361: #line 15 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 362: @__ctrl.HRef = "~/ ";
Line 363:
Line 364: #line default
Line 365: #line hidden
Line 366: return @__ctrl;
Line 367: }
Line 368:
Line 369: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 370: private global::System.Web.UI.WebControls.Menu @__BuildControlMenu1() {
Line 371: global::System.Web.UI.WebControls.Menu @__ctrl;
Line 372:
Line 373: #line 17 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 374: @__ctrl = new global::System.Web.UI.WebControls.Menu();
Line 375:
Line 376: #line default
Line 377: #line hidden
Line 378: this.Menu1 = @__ctrl;
Line 379: @__ctrl.ApplyStyleSheetSkin(this.Page);
Line 380:
Line 381: #line 17 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 382: @__ctrl.ID = "Menu1";
Line 383:
Line 384: #line default
Line 385: #line hidden
Line 386:
Line 387: #line 17 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 388: @__ctrl.CssClass = "MainMenu";
Line 389:
Line 390: #line default
Line 391: #line hidden
Line 392:
Line 393: #line 17 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 394: @__ctrl.DataSourceID = "SiteMapDataSource1";
Line 395:
Line 396: #line default
Line 397: #line hidden
Line 398:
Line 399: #line 17 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 400: @__ctrl.Orientation = global::System.Web.UI.WebControls.Orientation.Hori zontal;
Line 401:
Line 402: #line default
Line 403: #line hidden
Line 404:
Line 405: #line 17 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 406: @__ctrl.StaticEnableDefaultPopOutImage = false;
Line 407:
Line 408: #line default
Line 409: #line hidden
Line 410: return @__ctrl;
Line 411: }
Line 412:
Line 413: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 414: private global::System.Web.UI.WebControls.SiteMapDataSourc e @__BuildControlSiteMapDataSource1() {
Line 415: global::System.Web.UI.WebControls.SiteMapDataSourc e @__ctrl;
Line 416:
Line 417: #line 21 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 418: @__ctrl = new global::System.Web.UI.WebControls.SiteMapDataSourc e();
Line 419:
Line 420: #line default
Line 421: #line hidden
Line 422: this.SiteMapDataSource1 = @__ctrl;
Line 423:
Line 424: #line 21 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 425: @__ctrl.ID = "SiteMapDataSource1";
Line 426:
Line 427: #line default
Line 428: #line hidden
Line 429:
Line 430: #line 21 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 431: @__ctrl.ShowStartingNode = false;
Line 432:
Line 433: #line default
Line 434: #line hidden
Line 435: return @__ctrl;
Line 436: }
Line 437:
Line 438: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 439: private global::System.Web.UI.WebControls.TreeNodeStyle @__BuildControl__control5() {
Line 440: global::System.Web.UI.WebControls.TreeNodeStyle @__ctrl;
Line 441:
Line 442: #line 26 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 443: @__ctrl = new global::System.Web.UI.WebControls.TreeNodeStyle();
Line 444:
Line 445: #line default
Line 446: #line hidden
Line 447:
Line 448: #line 26 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 449: @__ctrl.CssClass = "FirstLevelMenuItem";
Line 450:
Line 451: #line default
Line 452: #line hidden
Line 453: return @__ctrl;
Line 454: }
Line 455:
Line 456: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 457: private void @__BuildControl__control4(System.Web.UI.WebControl s.TreeNodeStyleCollection @__ctrl) {
Line 458: global::System.Web.UI.WebControls.TreeNodeStyle @__ctrl1;
Line 459:
Line 460: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 461: @__ctrl1 = this.@__BuildControl__control5();
Line 462:
Line 463: #line default
Line 464: #line hidden
Line 465:
Line 466: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 467: @__ctrl.Add(@__ctrl1);
Line 468:
Line 469: #line default
Line 470: #line hidden
Line 471: }
Line 472:
Line 473: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 474: private global::System.Web.UI.WebControls.TreeView @__BuildControlTreeView1() {
Line 475: global::System.Web.UI.WebControls.TreeView @__ctrl;
Line 476:
Line 477: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 478: @__ctrl = new global::System.Web.UI.WebControls.TreeView();
Line 479:
Line 480: #line default
Line 481: #line hidden
Line 482: this.TreeView1 = @__ctrl;
Line 483: @__ctrl.ApplyStyleSheetSkin(this.Page);
Line 484:
Line 485: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 486: @__ctrl.ID = "TreeView1";
Line 487:
Line 488: #line default
Line 489: #line hidden
Line 490:
Line 491: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 492: @__ctrl.DataSourceID = "SiteMapDataSource1";
Line 493:
Line 494: #line default
Line 495: #line hidden
Line 496:
Line 497: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 498: @__ctrl.ShowExpandCollapse = false;
Line 499:
Line 500: #line default
Line 501: #line hidden
Line 502:
Line 503: #line 23 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 504: this.@__BuildControl__control4(@__ctrl.LevelStyles );
Line 505:
Line 506: #line default
Line 507: #line hidden
Line 508: return @__ctrl;
Line 509: }
Line 510:
Line 511: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 512: private global::System.Web.UI.WebControls.ContentPlaceHold er @__BuildControlcpMainContent() {
Line 513: global::System.Web.UI.WebControls.ContentPlaceHold er @__ctrl;
Line 514:
Line 515: #line 32 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 516: @__ctrl = new global::System.Web.UI.WebControls.ContentPlaceHold er();
Line 517:
Line 518: #line default
Line 519: #line hidden
Line 520: this.cpMainContent = @__ctrl;
Line 521:
Line 522: #line 32 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 523: @__ctrl.ID = "cpMainContent";
Line 524:
Line 525: #line default
Line 526: #line hidden
Line 527: if ((this.ContentTemplates != null)) {
Line 528: this.@__Template_cpMainContent = ((System.Web.UI.ITemplate)(this.ContentTemplates["cpMainContent"]));
Line 529: }
Line 530: if ((this.@__Template_cpMainContent != null)) {
Line 531: this.InstantiateInContentPlaceHolder(@__ctrl, this.@__Template_cpMainContent);
Line 532: }
Line 533: else {
Line 534: System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
Line 535:
Line 536: #line 32 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 537: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n "));
Line 538:
Line 539: #line default
Line 540: #line hidden
Line 541: }
Line 542: return @__ctrl;
Line 543: }
Line 544:
Line 545: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 546: private global::System.Web.UI.WebControls.ListItem @__BuildControl__control7() {
Line 547: global::System.Web.UI.WebControls.ListItem @__ctrl;
Line 548:
Line 549: #line 39 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 550: @__ctrl = new global::System.Web.UI.WebControls.ListItem();
Line 551:
Line 552: #line default
Line 553: #line hidden
Line 554:
Line 555: #line 39 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 556: @__ctrl.Text = "DarkGray";
Line 557:
Line 558: #line default
Line 559: #line hidden
Line 560: return @__ctrl;
Line 561: }
Line 562:
Line 563: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 564: private global::System.Web.UI.WebControls.ListItem @__BuildControl__control8() {
Line 565: global::System.Web.UI.WebControls.ListItem @__ctrl;
Line 566:
Line 567: #line 40 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 568: @__ctrl = new global::System.Web.UI.WebControls.ListItem();
Line 569:
Line 570: #line default
Line 571: #line hidden
Line 572:
Line 573: #line 40 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 574: @__ctrl.Text = "Monochrome";
Line 575:
Line 576: #line default
Line 577: #line hidden
Line 578: return @__ctrl;
Line 579: }
Line 580:
Line 581: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 582: private void @__BuildControl__control6(System.Web.UI.WebControl s.ListItemCollection @__ctrl) {
Line 583: global::System.Web.UI.WebControls.ListItem @__ctrl1;
Line 584:
Line 585: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 586: @__ctrl1 = this.@__BuildControl__control7();
Line 587:
Line 588: #line default
Line 589: #line hidden
Line 590:
Line 591: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 592: @__ctrl.Add(@__ctrl1);
Line 593:
Line 594: #line default
Line 595: #line hidden
Line 596: global::System.Web.UI.WebControls.ListItem @__ctrl2;
Line 597:
Line 598: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 599: @__ctrl2 = this.@__BuildControl__control8();
Line 600:
Line 601: #line default
Line 602: #line hidden
Line 603:
Line 604: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 605: @__ctrl.Add(@__ctrl2);
Line 606:
Line 607: #line default
Line 608: #line hidden
Line 609: }
Line 610:
Line 611: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 612: private global::System.Web.UI.WebControls.DropDownList @__BuildControlThemeList() {
Line 613: global::System.Web.UI.WebControls.DropDownList @__ctrl;
Line 614:
Line 615: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 616: @__ctrl = new global::System.Web.UI.WebControls.DropDownList();
Line 617:
Line 618: #line default
Line 619: #line hidden
Line 620: this.ThemeList = @__ctrl;
Line 621: @__ctrl.ApplyStyleSheetSkin(this.Page);
Line 622:
Line 623: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 624: @__ctrl.ID = "ThemeList";
Line 625:
Line 626: #line default
Line 627: #line hidden
Line 628:
Line 629: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 630: @__ctrl.AutoPostBack = true;
Line 631:
Line 632: #line default
Line 633: #line hidden
Line 634:
Line 635: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 636: this.@__BuildControl__control6(@__ctrl.Items);
Line 637:
Line 638: #line default
Line 639: #line hidden
Line 640:
Line 641: #line 37 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 642: @__ctrl.SelectedIndexChanged += new System.EventHandler(this.ThemeList_SelectedIndexCh anged);
Line 643:
Line 644: #line default
Line 645: #line hidden
Line 646: return @__ctrl;
Line 647: }
Line 648:
Line 649: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 650: private global::System.Web.UI.HtmlControls.HtmlForm @__BuildControlform1() {
Line 651: global::System.Web.UI.HtmlControls.HtmlForm @__ctrl;
Line 652:
Line 653: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 654: @__ctrl = new global::System.Web.UI.HtmlControls.HtmlForm();
Line 655:
Line 656: #line default
Line 657: #line hidden
Line 658: this.form1 = @__ctrl;
Line 659:
Line 660: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 661: @__ctrl.ID = "form1";
Line 662:
Line 663: #line default
Line 664: #line hidden
Line 665: System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
Line 666:
Line 667: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 668: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n <div id=\"PageWrapper\">\r\n <div id=\"Header\">"));
Line 669:
Line 670: #line default
Line 671: #line hidden
Line 672: global::System.Web.UI.HtmlControls.HtmlAnchor @__ctrl1;
Line 673:
Line 674: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 675: @__ctrl1 = this.@__BuildControl__control3();
Line 676:
Line 677: #line default
Line 678: #line hidden
Line 679:
Line 680: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 681: @__parser.AddParsedSubObject(@__ctrl1);
Line 682:
Line 683: #line default
Line 684: #line hidden
Line 685:
Line 686: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 687: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("</div>\r\n <div id=\"MenuWrapper\">\r\n "));
Line 688:
Line 689: #line default
Line 690: #line hidden
Line 691: global::System.Web.UI.WebControls.Menu @__ctrl2;
Line 692:
Line 693: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 694: @__ctrl2 = this.@__BuildControlMenu1();
Line 695:
Line 696: #line default
Line 697: #line hidden
Line 698:
Line 699: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 700: @__parser.AddParsedSubObject(@__ctrl2);
Line 701:
Line 702: #line default
Line 703: #line hidden
Line 704:
Line 705: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 706: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n "));
Line 707:
Line 708: #line default
Line 709: #line hidden
Line 710: global::System.Web.UI.WebControls.SiteMapDataSourc e @__ctrl3;
Line 711:
Line 712: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 713: @__ctrl3 = this.@__BuildControlSiteMapDataSource1();
Line 714:
Line 715: #line default
Line 716: #line hidden
Line 717:
Line 718: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 719: @__parser.AddParsedSubObject(@__ctrl3);
Line 720:
Line 721: #line default
Line 722: #line hidden
Line 723:
Line 724: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 725: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n "));
Line 726:
Line 727: #line default
Line 728: #line hidden
Line 729: global::System.Web.UI.WebControls.TreeView @__ctrl4;
Line 730:
Line 731: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 732: @__ctrl4 = this.@__BuildControlTreeView1();
Line 733:
Line 734: #line default
Line 735: #line hidden
Line 736:
Line 737: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 738: @__parser.AddParsedSubObject(@__ctrl4);
Line 739:
Line 740: #line default
Line 741: #line hidden
Line 742:
Line 743: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 744: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n <br />\r\n </div>\r\n <div id=\"MainContent\">\r\n "));
Line 745:
Line 746: #line default
Line 747: #line hidden
Line 748: global::System.Web.UI.WebControls.ContentPlaceHold er @__ctrl5;
Line 749:
Line 750: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 751: @__ctrl5 = this.@__BuildControlcpMainContent();
Line 752:
Line 753: #line default
Line 754: #line hidden
Line 755:
Line 756: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 757: @__parser.AddParsedSubObject(@__ctrl5);
Line 758:
Line 759: #line default
Line 760: #line hidden
Line 761:
Line 762: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 763: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n </div>\r\n <div id=\"Sidebar\">\r\n <p>Pick a Theme</p><br />\r\n "));
Line 764:
Line 765: #line default
Line 766: #line hidden
Line 767: global::System.Web.UI.WebControls.DropDownList @__ctrl6;
Line 768:
Line 769: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 770: @__ctrl6 = this.@__BuildControlThemeList();
Line 771:
Line 772: #line default
Line 773: #line hidden
Line 774:
Line 775: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 776: @__parser.AddParsedSubObject(@__ctrl6);
Line 777:
Line 778: #line default
Line 779: #line hidden
Line 780:
Line 781: #line 13 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 782: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n </div>\r\n <div id=\"Footer\">Footer Gose Here</div>\r\n </div>\r\n "));
Line 783:
Line 784: #line default
Line 785: #line hidden
Line 786: return @__ctrl;
Line 787: }
Line 788:
Line 789: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 790: private void @__BuildControlTree(masterpages_frontend_master @__ctrl) {
Line 791: System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));
Line 792:
Line 793: #line 1 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 794: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3" +
Line 795: ".org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\r\n<html xmlns=\"http://www.w3.org/1" +
Line 796: "999/xhtml\">\r\n\r\n "));
Line 797:
Line 798: #line default
Line 799: #line hidden
Line 800: global::System.Web.UI.HtmlControls.HtmlHead @__ctrl1;
Line 801:
Line 802: #line 1 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 803: @__ctrl1 = this.@__BuildControlHead();
Line 804:
Line 805: #line default
Line 806: #line hidden
Line 807:
Line 808: #line 1 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 809: @__parser.AddParsedSubObject(@__ctrl1);
Line 810:
Line 811: #line default
Line 812: #line hidden
Line 813:
Line 814: #line 1 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 815: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n<body>\r\n "));
Line 816:
Line 817: #line default
Line 818: #line hidden
Line 819: global::System.Web.UI.HtmlControls.HtmlForm @__ctrl2;
Line 820:
Line 821: #line 1 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 822: @__ctrl2 = this.@__BuildControlform1();
Line 823:
Line 824: #line default
Line 825: #line hidden
Line 826:
Line 827: #line 1 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 828: @__parser.AddParsedSubObject(@__ctrl2);
Line 829:
Line 830: #line default
Line 831: #line hidden
Line 832:
Line 833: #line 1 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er"
Line 834: @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n</body>\r\n</html>\r\n"));
Line 835:
Line 836: #line default
Line 837: #line hidden
Line 838: }
Line 839:
Line 840:
Line 841: #line 912304 "C:\BeginASP.NET\WebSite\MasterPages\Frontend.mast er.cs"
Line 842: [System.Diagnostics.DebuggerNonUserCodeAttribute()]
Line 843: protected override void FrameworkInitialize() {
Line 844: base.FrameworkInitialize();
Line 845: this.@__BuildControlTree(this);
Line 846: }
Line 847:
Line 848: #line default
Line 849: #line hidden
Line 850: }
Line 851: }
Line 852:





--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.468
 
Old December 7th, 2011, 04:20 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

In that case, there's one curly brace too many above that method. In other words, rather than adding one at the bottom, you need to move the last one above ThemeList_SelectedIndexChanged to the bottom (or simply delete one now, now that you already have one.

If something like this occors again, simply count your braces. it should look like this:

Code:
 
public class Whatever
{
  public void MethodName()
  {
    if (someCondition)
    {
 
    }
  }
}
As you can see, each opening brace has a matching closing one at the same level.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 7th, 2011, 04:57 PM
Authorized User
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default code problem

Imar

I could not get the changes to work so I copied your code from the download file for chapt 7. Now I am getting this:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 25: }
Line 26: }
Line 27: switch (Page.Theme.ToLower ())
Line 28: {
Line 29: case "darkgrey":


Source File: c:\BeginASP.NET\WebSite\MasterPages\Frontend.maste r.cs Line: 27

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
MasterPages_Frontend.Page_Load(Object sender, EventArgs e) in c:\BeginASP.NET\WebSite\MasterPages\Frontend.maste r.cs:27
System.Web.Util.CalliHelper.EventArgFunctionCaller (IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.468

copy of cs code

using System;
using System;
using System . Collections . Generic;
using System . Linq;
using System . Web;
using System . Web . UI;
using System . Web . UI . WebControls;

public partial class MasterPages_Frontend : System.Web.UI.MasterPage
{
protected void Page_Load (object sender , EventArgs e )
{
if ( !Page.IsPostBack )
{
string selectedTheme = Page.Theme;
HttpCookie preferredTheme = Request.Cookies.Get ("PreferredTheme");
if (preferredTheme != null )
{
selectedTheme = preferredTheme.Value;
}
if (!string.IsNullOrEmpty (selectedTheme) &&
ThemeList.Items.FindByValue (selectedTheme) != null )
{
ThemeList.Items.FindByValue (selectedTheme ).Selected = true;
}
}
switch (Page.Theme.ToLower ())
{
case "darkgrey":
Menu1.Visible = false;
TreeView1.Visible = true;
break;
default:
Menu1.Visible = true;
TreeView1.Visible = false;
break;
}
}

protected void ThemeList_SelectedIndexChanged ( object sender , EventArgs e )
{
HttpCookie preferredTheme = new HttpCookie ("PreferredTheme");
preferredTheme.Expires = DateTime . Now.AddMonths (3);
preferredTheme.Value = ThemeList.SelectedValue;
Response.Cookies.Add(preferredTheme);
Response.Redirect(Request.Url.ToString ( ) );
}
}
 
Old December 7th, 2011, 05:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Maybe you haven't set the theme in web.config?

If you post code or error messages, please paste it in Notepad first to remove color coding and then use the forum editor's Code toolbar button to wrap your code in code tags. Otherwise, this forum messes up the code and makes it hard to read.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 7th, 2011, 05:54 PM
Authorized User
 
Join Date: Sep 2011
Posts: 29
Thanks: 5
Thanked 0 Times in 0 Posts
Default code problem

Imar

Thank you for your time, you have been a big help. So how I lost the code in the config file.
 
Old December 7th, 2011, 05:56 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't know. Maybe you removed it, or you never added it there in the first place?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chp 7 : Dig.js - need to correct code Robert Moses BOOK: Professional XMPP Programming with JavaScript and jQuery 4 March 15th, 2012 01:47 AM
Chp 10 Try it Out (calling WS from Client code) not working anjumk BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 October 7th, 2011 03:18 PM
Client code for Chp 7 UoW mwiza BOOK: Professional ASP.NET Design Patterns 1 September 20th, 2011 09:00 AM
chp 8 Try It-missing code drpat BOOK: JavaScript 24-Hour Trainer 3 July 18th, 2011 08:54 AM
Why does this code work (chp.6)? wrockinator BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 3 December 3rd, 2008 03:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.