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

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

Setting the page theme outside of the web.config

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


I'm using a flash app to upload images (EAFlashUpload - http://www.easyalgo.com/eaflashupload.aspx) which works great, but there's a problem.

For reasons beyond my understanding, if a theme (page theme = "white") is declared in the web.config, it doesn't work correctly; even if there is nothing in the theme folder at all! Oddly though, it's happy if the theme is set at the page level. Problem is, I don't want to have to hard code the page theme into every page. Is there another place I can set the page theme? I've tried in the code behind of the master page (pre_int), and also adding a web user control with some code behind to the master page.

Any help would be much appreciated.


View Complete Post

More Related Resource Links

Setting the default start page in godaddy hosting?


 How do you set the start page with godaddy hosting? I can see no way of doing this! You do not seem to have access to the IIS settings that allow you to change it!

ajax setting in web.config httpHandlers


 I'm using an autocomplete contol of ajax toolkit. Yesterday a user found that it had stopped working (it wasn't generating the list as you type letters in the textbox). After hours of troubleshooting, I found that in web.config <httpHandlers>, this line -- <remove verb="*" path="*.asmx" /> was placed after the <add> line like this:

    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
    <remove verb="*" path="*.asmx"/>

I fixed the problem by removing the <remove> line, but it seem

Setting maxItemsInObjectGraph in a WCF REST config file???

Hi All, I am trying to create a new WCF Rest service. I used the online VS2010 WCF REST 4.0 template as a base. I have a service up and running and have been testing it using IE/Firefox (currently it is a read only API, so I have no need to post anything back to the service). I have an issue when the number of items being returned is too large, IE give me a "Internet Explorer cannot display the webpage" I turned on tracing and was able to confirm the issue is with the maxItemsInObjectGraph property (defaults to 65536) <Message>Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. </Message> Using the defualt WCF Web.config file I have no clue how to set this value as it doesnt seem like a standardEndpoint can have this value set, or have a custom binding or behaviour assigned to them (at least I don't know how to set them). Here is the default web.config file the template created. Does anyone know how i can update/increase the maxItemsInObjectGraph property?      <system.serviceModel>    <diagnostics>      <endToEndTracing propagateActivity="true" activityTracing="true"   &nb

The site master page setting currently applied to this site is invalid. Please select a new master p

I have defined a new master page and set it as default for the main site.  Any time I create a new subsite it does not apply the new master page and defaults back to the default.master.  The Site Master Page Settings shows this error. The site master page setting currently applied to this site is invalid. Please select a new master page and apply it The system master page setting currently applied to this site is invalid. Please select a new master page and apply it. Now if I select "Inherit site master page from parent of this site" and "Inherit system master page" and click ok the site will use the new master page and everything is fine.  There is only one modification to the master page that was done so I know the master page isn't invalid.  Does anyone know the answer other than recreating the new master page.

Setting theme to windows application

Hi I am having Vista Machine & I am developing windows application with VS2008. When i run my application it is showing the current windows theme by default. I want to apply XP classic theme to it. Can you please suggest me how to set my winform as well as control style to XP classic theme. Means after developing my winform application on vista if i run that application on any of the Windows OS it will show me XP theme not the default theme of that operating system. Is there any way for doing the same ? If yes please share it. Thanks, Devendra

page.setfocus(listbox.selecteditem) is not setting the focus if index > 820

Hi All, Does any one know the reason Why I am unable to setfocus to my list box if the index > 820 My list box contains 2000 items and the index is not  able to set the focus if the index > 820  

My master page won't load when using authorization in web.config

I don't have any sub catalogs for the .aspx files and this is my web.config file:<system.web> <compilation debug="true" targetFramework="4.0" /> <authentication mode="Forms"> <forms loginUrl="Login.aspx" name="sqlAuthCookie" timeout="60" /> </authentication> <authorization> <deny users="?" /> <allow users="*" /> </authorization> </system.web> It's as if the Login.aspx won't grab the Site.Master if I add this authorization.I get directed to the Login.aspx if I try to enter any other page, but without seeing the master page.Is this enough info to solve this or do you need to know how the other pages looks like? Let me know!Thanks in advance.Niklas

change search results page According to custom setting page

I want to create user settings page will be able to choose which will  search results display page x or page y Settings will be saved somewhere. When the user searches on sharepoint search page will display to the user  the page that he select in the search page settings page x or  page y   my questions : 1. Is it necessary to treat the user profile - If so how? 2. how results can be directed to the search results page after a user choose Specific page? 3. where save the settings from custom settings page  ?

Setting custom master-page.


How can I set a custom master-page to a site or site-collection? There should be a link in site actions>site settings>look and feel called "master page" but Im not seeing it. Where is that exactly?


Popup window config setting not functioning in CRM environment inside IFRAME?


Hi friends,

I used the Javascript command to open a configured window with the following attirbutes and it works well on my HTML page but strangely when I copy the same command into MS CRM a aspx application inside an IFRAME it open the window but without any config with some standard height menubar and everything.

window.open('http://www.google.de', 'help', 'width=320,height=210,scrollbars=yes')

Thanking you in advance,



Getting the current Theme from the web.config



I need to read the theme defined in the web.config. I've had a play with the following:

Label1.Text = System.Configuration.ConfigurationManager.AppSettings["theme"];

Any thoughts?

Many thanks, as always.

Setting a theme using Set-SPWeb


On SP10, I tried to set a theme for a web using Set-SPWeb commandlet as below.


Set-SPWeb -Identity $UnitsADM -Theme "Laminate"


However, I got an error saying "couldn't open the folder Laminate".

Please anyone drop me a sample line of commandlet setting a theme. Thank you!

Get a changed Setting from the app.exe.config


I've got settings that I use in my app (paths, etc - My.Settings.whatever), but with the app. config file, the user can change them.

I'd like to get one or more of the changed settings and put them in a log file.....

How can I retrieve the changed setting?


How to change Asp.net Theme via Web.Config on the fly



I have a web-application with more than 5 themes. Each themes covers a completely different style for different customers. whenever we publish a new version of our application we send it for all of customers.

The problem.

We specify theme in web.config file in <Page> tag. like


<page theme="Theme1" /> // or Theme2 for second customer. 

with this approach we easily change the style of application from each other without writing codes which needs a new publish for each one.

With changing the theme="Theme1". nothing change and we didn't write a code in application , so why changing theme don't change the theme and we need a new publish?

we want to change it in web.config or somewhere else and with changing it the theme change without needing a new publish for each one.


I Publish Once and then copy the published version for each customer (5 times) then in each web.config file I change the theme="CustomerTheme". but only the theme which was acti

setting dropdownlist item in page load


 I can't get the following to set on page load.  I want the month selected be the current month, on page load.  What needs to change here?

DropDownListCCExpMo.SelectedItem.Selected = Date.Today.Month


property setting in report server (2008) config file is not working as expected.



I have set the <WorkingSetMinimum> property to 2.4GB in my reportserver 2008 config file.

By defintion, <WorkingSetMinimum> setting means,

  1. Lower limit of service memory consumption; memory will not be released if the consumption is below this amount, though the service will not reserve the designated amount of memory when it starts.
  2. If service uses more than the designated amout of memory, it will release back the memory only till this declared value and not beyond that, which means it should keep 2.4GB as designated.

See this link for definition: http://books.google.com/books?id=mzY_Xo_9J-gC&pg=PA589&lpg=PA589&dq=What+is+%3Cworkingsetminimum%3E+in+report+server+configuration+file&source=bl&ots=r_xhRp8erj&sig=E_o0-Dh2SXOgMNrW3sptt5oZrYI&hl=en&ei=f5mjTNeNM5O8ccmErJMI&sa=X&oi=book_result&ct=result&resnum=4&ved=0CCAQ6AEwAw#

Why do I get default error page desipite setting customErrors mode="Off"?


I could never figure it out -  set  <customErrors mode="Off" /> in all web.config files that exist under Interpub/wwwroot, but still get default error page. Which web.config does SharePoint use?

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