Web Forms :: User Selectable Themes Using Master Pages Working ?

Jan 25, 2011

I'm trying to set profiles/themes using a basepage to allow the colour of my site to change for users. I can do this on a single page but I'm trying to do this site wide and am getting an error.

I've been watching http://www.asp.net/general/videos/how-do-i-create-user-selectable-themes-for-a-web-site this tutorial

but I'm getting errors at the final step...

System.NullReferenceException was unhandled by user code Message="Object reference not set to an instance of an object." Source="App_Code.gflsvdcc" StackTrace: at BasePage.OnPreInit(EventArgs e) in D:WebsitesBalticQuarter19.01.11App_CodeBasePage.vb:line
9 at System.Web.UI.Page.PerformPreInit() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) InnerException:

is the error, The error occurs because of the line 9 =

9 - Me.Theme = Request.Form(Me.Master.FindControl("DropDownList1").UniqueID)

If I insert this instead of the text above the colours change on the site.

Me.Theme = Request.Form("ctl00$DropDownList1")[code].....

View 4 Replies


Similar Messages:

Web Forms :: Themes Or Master Pages?

Jun 21, 2010

I have been working on a fun little project just to build my skills as an ASP.Net developer. I have learned quite a bit thus far, and don't normally post questions in forums. Google and the books I own generally do the trick for me. But for this question I would like some community input.

I am developing a simple blog platform in ASP.Net / C#. Eventually I hope it will basically be a clone of how Wordpress works. Again, this is mostly a learning project for myself and I realize there are many projects out there doing what I am doing in .Net.

Anyways, the question I want some input on is whether I should use themes or master pages to customize the look and feel of the site. As I understand it, a theme mostly just changes colors and such, but CAN do much more. Whereas a master page can easily change the look and feel of an entire site.

What are the pro's and con's of either route, and what would y'all recommend? I'm not really looking for code examples here, just input on what y'all would think is the best route to pursue.

View 6 Replies

Web Forms :: Nested Master Pages And Themes?

Aug 12, 2010

to a vb code resource/tutorial that explains how you can change a theme from a dropdown list on a content page derived from a nested master page, not the main master page.

View 1 Replies

Web Forms :: Setting Global Themes To Master Pages?

Jun 28, 2010

We have a nested master page which we have made it as a seperate class library.(Becoz many projects use the same master page) Initially we had all our css files,skin files, images inside the Master page project itself. But now we wanted the themes to be global and moved it out to wwwroot as mentioned in the below link.

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/themes/themes.aspx#global

The Masterpage has user controls out of which one user control has the telerik menu. The css is not getting set for that particular user control. We use relative path for setting the style sheet link. But it is not getting set. Its still referring to the old path. But all the skin files, images are pointing to the new global location. Except for the telerik menu rest all is aligned according to the style sheet.

When i do view source, the link to style sheet is pointing to the old location. I dunno why this happening. Is this a telerik issue or i am going wrong somewhere.

View 7 Replies

Web Forms :: Using Themes And Multiple Master Pages To Make A Template/profile Based Website?

Oct 21, 2010

I have atleast 10 websites that have different css,html,javasacripts and webconfig. But the same code behind files.With this design everything is hard to maintain. So I decided to work on it and I started moving all the queries in the code beghind file to stored procedures. Since every website uses the same database.

What I have decided is to make use of themes and multiple master pages? IS this the best way to go about it?

Also lets say I have two templates. There is site A and site B. both using different templates. And have pages Home About Us and Contact.

Now would I be creating three different masterpages? for each template so 6 in total? ( since none of the templates are supposed to look the same)

or Should I just create two masterpages? if so how would I manage the html of the page so it looks different?

View 1 Replies

AJAX :: Set Title For Content Pages When Working With Master Pages?

May 17, 2013

How can we add titles to each content pages which inherits from mater pages in asp.net?

View 1 Replies

Web Forms :: Master Pages Ans Roles/user Security?

Feb 1, 2010

I have following situation: A web with a defaults.aspx & login.aspx 2 folders ADMIN & MASTER, in the ADMIN folder is a content page admin.aspx who's master is in the master folder.when I place, following web.config in the ADMIN folder he still is showing the admin.aspx for all users, when I place a new standalone aspx file in that directory the access is denied.Why is de content file not secured ? Must I secure the master file so do i need a new masterfile for each rol, user then...

in that directory<system.web>
<authorization>
<allow

[code]....

View 4 Replies

JQuery UI Not Working With Master Pages

Feb 8, 2011

I've successfully made JQuery work with Master Pages, but not JQuery UI.My header in the master page looks like this:

<head runat="server">
<title>Analytics</title>
<link href="~/css/PageElements.css" rel="stylesheet" type="text/css" runat="server"/>
<link href="~/css/FormElements.css" rel="stylesheet" type="text/css" runat="server"/>
<link href="~/css/Buttons.css" rel="stylesheet" type="text/css" runat="server"/>
<link href="<%# ResolveUrl("~/css/smoothness/jquery-ui-1.8.9.custom.css") %>" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="<%# ResolveUrl("~/Scripts/jquery-1.4.4.min.js") %>" />
<script type="text/javascript" src="<%# ResolveUrl("~/Scripts/jquery-ui-1.8.9.custom.min.js") %>" />
<script type="text/javascript">
jQuery.noConflict(); <%--This should avoid conflicts Ajax Control Toolkit--%>
</script>
<asp:ContentPlaceHolder ID="HeaderPlaceHolder" runat="server" />
</head>

And in the content page, I created a VERY simple script to load the Date Picker, as per JQuery UI demo page. I always get a 'Microsoft JScript runtime error: Object doesn't support this property or method'. Here's my content page:

<asp:Content ID="MainContent" ContentPlaceHolderID="MainPlaceHolder" runat="server">
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('#<%=btnSubmit.ClientID %>').click(function () {
alert("Hello world!");
});
});
</script>
<script type="text/javascript">
jQuery(function () {
jQuery('#<%=datepicker.ClientID %>').datepicker();
});
</script>
<div class="demo">
<p>Date: <asp:TextBox runat="server" ID="datepicker" /></p>
</div>
<asp:Button ID="btnSubmit" runat="server" Text="Submit" />
</asp:Content>

The CSS folder is in place, and pure JQuery calls work. This simple datepicker is not working with this master page / content setup. I've tried many combinations for the datepicker ID, using ClientID (as is), UniqueID, [id$=datepicker], etc. Can someone shed a light on this? What am I missing?

View 1 Replies

Web Forms :: Efficient Or Worthy Use Of User Controls And Master Pages?

Jul 12, 2010

I have taken over an application where the original developer has used an inordinate amount of user controls and master pages. There are multiple master pages all over the site, with user controls on top of user controls through out the site as well. Some of the user controls are reused, many are not. Would you deem this an efficient or worthy use of user controls and master pages? From my point of view it clutters the project and makes debugging a real chore.

View 2 Replies

Web Forms :: Data Sets - Use Master Pages Or User Controls?

Aug 20, 2010

I have a C# website developed with Visual Studio 2008 with a SQL backend. I have a top Navigation menu that has seven different tabs. I have a specific right bar content for each of the seven tabs. The content for the right bar is stored in a sql database and will be accessed using data sets. I believe that I have two ways to display the information with the data set...

1. User control - Create a User Control for each data set and then drop that on to the respective pages.

2. Master Pages - Create a Master Page for each of my seven sections, adding the data set to the respective Master Page.

Is there a preffered approach to achieve my goal? I am thinking Master Pages would be the most efficient but not certain. Is there another method I should consider?

View 1 Replies

Web Forms :: Master Pages Rendered User Controls Obsolete?

Nov 27, 2010

I am using a <a href=[URL], an open source e-commerce platform, for one of my projects, and I noticed that they use Master Pages as well as user controls. When I looked some of this up, some people made it appear as if Master Pages were intended to replace user controls. Is this true? In my opinion, if I were to start an ASP.NET app from scratch, I would think a Master Page would be enough, but I guess user controls could be utilized.

View 2 Replies

AJAX :: $find Not Working On Master Pages

Aug 2, 2010

I used this example from [URL] I changed it around to fit in a regular aspx page and it works great. however when I move it into my child page of a master page it fails on the AnimationExtended. Does anyone have a solution for the $find statement in child pages of a master page? Code is below. Errored line is bold faced.

[Code]....

View 3 Replies

Web Forms :: Accessing A Public Property Of A Nested User Control In A Master Page From A Pages' User Control?

Sep 10, 2010

I've got a web site that has a master page and that master page (mpMaster that has a user control ucControl1) which has a sub user control (ucControl2), this user control has a property which accepts a value. Now, I have a page that uses the master page
and on this page I have another user control (ucPageControl), I need to find a way of setting the value in ucControl2 from ucPageControl. Is this possible at all?

View 5 Replies

AJAX :: Can't Get Collapsible Panel Extender To Working When Using Master Pages

Aug 18, 2010

I can't get the collapsible panel extender to working when using a master pages. The code bellow works without assigning a master page but I need to use master page because I am doing a large project. Parser Error Message: The server tag is not well formed. Error in line: <asp:CollapsiblePanelExtender runat="server"

[Code]....

View 2 Replies

Web Forms :: Master Page And Css Themes Does Postback Each Time?

Dec 29, 2010

I have a master page which contains a treeview and a linkbutton. i have used 3 different stylesheets for the same page and those are listed in dropdownlist on the same master page. on dropdownlist change() event stylesheet of the master page change, i have 1 default style sheet which will come as master page loads.

now the problem is when i changed stylesheet from dropdown list, stylesheet changes the master page , but after that when if i clicked on treeview or linkbutton the stylesheet is restored to default one.

i have written following code

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

View 2 Replies

Web Forms :: Access Public Property Of User Control In Master Page On Child Pages?

Nov 29, 2010

How can one access public property of User Control In Master Page on child Pages.

View 1 Replies

AJAX :: ToolkitScriptManager Extender Control Not Working In Nested Master Pages

Jan 6, 2010

I am using v3.0.31106.0 of the AjaxControlTookkit.dlll. I have nested master pages. The site Master page has the only ScriptManager & holds the oneColumn & twoColumn master pages. The twoColumn master page holds content pages. In the content page there is a update panel.
Here is my Site Master Page:

[Code]....

Here is the Nested Master Page:

[Code]....

Before the update page I put the ToolkitScriptManager. In the update panel I put a button with a ConfirmBox Extender. I then get an error saying Only one instance of a ScriptManager can be added to the page. If I take the ToolkitScriptManager out this error goes away but then I get an error saying The ConfirmBox Extender is not recognized.According to all the posts I have read the last 24hours the master page should have the ScriptManager and the content page should hold the toolkitScriptManager.Here is my content page:

[Code]....

Here is the web.config file:

[Code]....

View 7 Replies

AJAX :: How To Add Accordion CSS File In Content Page When Working With Master Pages

Apr 25, 2013

i want to apply css on accordion control but since the page where i m using is already associated with master page...

when i go to my website page..i use attach style sheet and then ok..but style sheet doesn't get attach...how should i do that..?

View 1 Replies

Use 2 Different Themes Based On The Master Page?

Feb 9, 2011

I have an App_Themes directory, and also Master pages for a ASP.NET website.

Can I use 2 different themes based on the master page?

View 1 Replies

Search Pages And User Controls To See Which Master Page And Base Class They Use

Feb 12, 2010

I want to search my asp.net pages and user controls to see which master page and base class they use. I mention search because we are re-factoring a large project and we need to track progress on the code conversion. I know I can pull this information individually but I need a automated and repeatable procedure.

View 1 Replies

ADO.NET :: SQL Searches Based On User Selectable Fields?

Oct 14, 2010

This is the second time I've searched on this and came up not fully understanding why this isn't possible. Say you have one text box, but you want to be able for a user to search by "company name," "job number," or "Order No," So you put one text box and a drop down list where the user can select what field to search.

Here is what I would like to do Select [order_no], [job_no], [company_name] From [order_tbl] WHERE @var1 Like '*@var2*' (maybe not totally correct syntax, but you get the picture....and @var1 is set from the selection of the dropdownlist and @var2 is set from the text box).

What I do now is three separate SQL statements. If DropDownlist1.SelectedValue = 1 then do, if it = 2 then do, etc.

But when you have a large select statement with table joins, you have to make any changes three times, and it seems easy to make a mistake...not to mention if you have more than three choices, you have an SQL statement for each choice.

Am I misunderstanding that it isn't possible to do a variable field name so I can have one select statement to work with? And if it isn't possible, I just wish I could wrap my head around why, because it seems such a simple thing to do.

View 6 Replies

Web Forms :: VS2010 Master Pages / Everything Shows On The New Pages Except The Jpeg Image Logo?

Sep 5, 2010

i'm developing a site using VS2010 and with my windows vista busniness OS. i used the default VS2010 wizard for new web application to create it. included a folder in the root directory and created new aspx pages to derive from the master page in the root directory of my site. everything shows on the new pages except the jpeg image logo in the master page. But other aspx pages i created in the root directory shows every thing fine.

View 1 Replies

Web Forms :: Master Pages - All My Pages Inherit From The Base Page Class

Jun 21, 2010

Currently I'm doing common functionality required throughout my site inside of my masterpage. What I want to do is move this functionality to a BaseClass so All my pages inherit from the Base Class. However, I'm not sure how to set this up interms of c# code with regards to Using a Base Class and then having a masterpage applied to my aspx pages that i create.

View 5 Replies

Web Forms :: Use Link Master Pages In Content Pages?

May 11, 2010

My requirement was to share master files among diff projects i read this doc [URL] so i use this technique to share msster pages among my diff projects in a soln but i dnt know how to reference such shared master page as if i use such

<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="../masterPages/masterInvGen.Master"

View 1 Replies

Web Forms :: Where Shall I Store User Selected Themes

Jan 23, 2010

I have a simple ASP.NET web site with membership (using SqlMemberShipProvider). I allow users to select a theme to setup a design of the pages they like.

Now the question is: Where shall I store this selected theme per user?

My initial idea was to use profiles. So I have defined a profile property called "Theme" in the web.config file. All this works so far as long as the user has logged in to the web site.

But there remains one open point:If the user isn't logged in and enters the login page how can I make sure that he sees the login page with the theme he has selected before?

Obviously (at least I think it's obvious) I cannot pull the theme of the login page from the profile of that user as long as he hasn't logged in.

So how can I overcome this issue? Is it perhaps the wrong place to store the theme in the user profile table? Should it be better stored somewhere on the client PC of the user?

View 5 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved