I would like to know how can I change the themes and skins or (CSS) dynamically and what are the basic requirements for it. Is there any design structure must be same..? Following are my requirements. E.g. we have 3 themes. Theme1, Theme2 and Theme3. Designations are. Employee, Manager and Sen.Manager And I want to assign Theme1 to Employee and Theme2 to Manager and Theme3 to Sen.Manager. After Employee gets promoted to Manager the Theme2 must be assign to him. And when they login there Theme and skin must be change according to his designation. Hope you can understand.
I am in need of applying the skins and themes in asp.net to my asp.net mvc2 applicatoin too. however i need to figure out the best way to apply the theme and skins in the mvc framework.
kindly suggest me the folder structure and how to apply them to different views. even though the css can do all stylings, i would like to get an insight into using these.
So I have a couple of Masterpages as base templates and a couple of themes that can be applied to either one of these masterpages. Using profiles, global.asax and some code behind I can change the Themes dynamically but they are associated with the profile. In other words, once the user logs off, the theme is changed back to default.
My objective is to use an Admin page to
1. change the theme of the site permanently for all users, including anonymous visitors.
2. change the masterpage for all pages permanently for all users, including anonymous visitors.
So when I log off after changing the settings, the new settings are retained.
I'm trying to figure out how to use skins, and I'm a bit baffled by one thing. When I place a skin file in the "root" of the theme I'm working on, it works great. However, if I try to make a folder to put it in, it fails. I cannot seem to locate any particular information that describes why this is. This is what works:
/App_Themes/App_Themes/MyTheme/App_Themes/MyTheme/MySkin.skin This is what I'd prefer, but does not work /App_Themes/App_Themes/MyTheme/App_Themes/MyTheme/skins/App_Themes/MyTheme/skins/MySkin.skin
I'm using a skin file, and within the skin, I'm applying all the settings using CSS. I've got most parts working, but how do I set 'CellPadding="1" CellSpacing="3"' using CSS?
I have never used skins before, so I went online and found some samples. I am trying to get ANY skin to work, so I have an incredibly simple site, a master page, the default.aspx, the skin file. I am missing something because as near as I can tell my skin file is set up correctly and I THINK I am doing it all correctly, but the skin file / contents seems to be ignored. Here is the master page, all I am trying to do is change the colour of the submit button. I figure once I get the skin recognized the rest should be easy...
[Code]....
My default.aspx has NO changes to it. I created a new one added nothing so I am not displaying it here. In my App_Themes directory a new folder called 'First' was created. In that folder is a file called 'First.skin'. The contents of First.skin is: [Code]....
Maybe there is something in the web.config that the people who made the samples assumed I would know about... not sure.
I am implementing the Tabs dynamically from serverside, loading usercontrols inside them (using AjaxToolkit). Question is, If I click on one of the hyperlink inside one of the tabs, it should open a new tab dynamically to show the results. How can I achieve that?
I'm writing a SaaS application with a web front end written in ASP.NET. I'm not much of a designer, and my ASP.NET knowledge is not yet at the expert level - I usually focus on server side stuff - but I have a basic master page and style sheets, which do the trick.
Now I want to offer my customers the ability to customize their web site with their own style sheets, colors, background pictures etc. so that their customers will log onto their portal at mycustomer.mydomain.com and see the skin that "mycustomer" has chosen.
Ive got some custom code that im using to load user controls dynamically depending on the option a user selects from a menu control on the page.
I wanted to create an admin page that can be used to provide a one stop shop to complete all actions within an app im building, (like a template/iframe scenario that loads all selections in a screen on the right)
My code works, however when the user has completed an action sucesfully within one ascx, then selects another from the menu on the left, it wont load the new control, it comes up blank like it hasnt refreshed properly meaning that they have to close down the page and reopen it. (which is very annoying)
My codes below, can someone take a look and see if they can see whats wrong.
i want to be able to load user controls and populate them with data from a sql database at runtime based on a status field in my database but im struggling to do this.
my default page.aspx holds the user controls (acts like a container). at the moment i had referenced all the user controls to load up when the page was loaded so:
[Code].... [Code]....
i then created a procedure which reads from the database the "status field". so if the status field is "pending" then i want the uc:GRLOLApproval control to show up but im not sure where to put this code or how to do it. i want to be abel to load the control at runtime and run this code. in my default.aspx.cs code i have done the following in the page load: [Code]....
i tried to reference te user control in my default.aspx page by doing: protected GRLOLApproval GRLOLApp; but it wouldnt recognise it because it not been reference in the source file.how do i reference it so that i can read the data from my database and write to the fields in uc:Collectionrequest. (I have exposed the properties in the uc:CollectionRequest that i want to access btw) have been working on this for days now and just cant seem to load the user control or access any properties.
I have UserControl that has asp control(<asp:Button runat="server" ID="btn" />) and I want to render it. I tried 1
[Code]....
It doesn't works because it says that each control that has runat="server" must be in Form.I also tried 2:Because loader.Form is null, I create HtmlForm and added the ctrl to it and then added HtmlForm to loader's Control, BUT it says that it has 2 HtmlForm. So, instead I "injected" HtmlForm to loader like this [Code]....
Now no error is occurred, BUT StringWriter is empty. don't tell me to add Page to solution and override OnRender. I want to do it as I mentioned above.
I was looking through my transcender exam kit for 70-562 and they say load dynamically created controls in the loadviewstateEvent. This should be CreateChildControls() instead, no?
When it comes to the usercontrol specially when they are loaded dynamically on the basis of certain conditions then it becomes a very confusing work. I have read in many forums that the dynamic controls have to be loaded in OnpreInit or OnInit. Some of those links are[URL] But this is useful only when if the we know that we have to load UserControl1, UserControl2 without considering any conditions. But what if I have a Tab control and for each Tab Click I have to load the UserControl dynamically. In that situation how can we add the control in either OnPreInit or OnInit. If I am not mistaken then in such case, then we can add usercontrol in certain events. If we are using a TabControl then we load in Tab_Click , if we are using Menu Control then we use Menu_Click and depending upon the particular tab or Menu we load associated usercontrols. Hence in these conditions, how can we go with the logic mentioned by above links. I have this confusion for very long time . I am posting little portion of my project here. I am using RadTabControl but it doesnt matter if it is Microsoft TabControl. In the aspx, I have a code to define RadTabControl.
In the code behind, I am loading usercontrol on the basis of the particular TabClick. tabMeberDetails_Click fires whenever I click on the tabs.ViewState["ControlName"] stores UserControlName on the basis of certain condition and finally i load the usercontrol.
proteced void tabMemberDetails_Click(object sender, RadTabStripEventArgs e) { Conditions...... { ViewState["ControlName"]=........ } viewDef=ViewState["ControlName"] UserControl control = (UserControl)LoadControl("~/Controls/" + viewDef + ".ascx"); after this I add control to the RadTabStrip.................. and call bind method......... }
As you can see from above, I am loading my usercontrol in tabMemberDetails_Click event. I see no other choice to do it in OnPreInit. Can anyone answer if this is the right way to do or there is another way that complies with the logic in the links given above.
Just upgraded to VWD2010. I created a skin file and put it in App_Themes. I created a skin id for a couple of controls: gridview, dropdown etc. Normally in the properties you can go to skinid and a drop down with the skin id shows up and you can select it. Thats not happening. Also, if I put my skinid in for the skinid property of the component its not displaying the formating at all. For example: Here is what I have for a gridview in my skin file named /App_Themes/Default/Default.skin
how to load user control dynamically on asp.net page? I am loading user control in my page_Init() event under if(!IsPostBack) but when user post the with any button click then my user control is disapper?
If i am loading control without if(!IsPostBAck) then its fine, but each time a page is posted loading of control is not good because it will slow my web site?
I want to know how can I load my files (file1.aspx and file1.aspx.vb) in a container on my index.aspx. My index should have my menu and my container. My problem is that i don't know how do that... options wich i tried:
Iframes: yes work it... but in html 5 iframe will dissapear...
MasterPage: isn't the solution because this refresh all index page.
Ajax: yes.. charge my File1.aspx in the container but i can't call the functions of File1.aspx.vb..
I have quite a simple requirement, but strangely can't seem to find anything relevant & I'm not able to currently get it to work. I have created a master page with a a page header and footer, and left two contentplaceholders in it, one to add to the <head> html tag and one in the <body>. The idea is that users can then easily change the content or title of a page in a table without having to open an IDE of any kind.
The result is my page template looks like this:
[Code]....
Basically, I want the user to be able to paste all of their HTML into a DB table, and I will pull it out and put it into these placeholders. Most methods I've seen involve using extra controls, but surely there is a way to just enter text (that will be html) between the <asp:Content></asp:Content> tags on the Page_Load event?
I have been looking for the last day since some who was nice enough to suggest I change the look of my web application theme by haveing different css sheets. I have found many references to
where stylesheet_name is a value from a database entery
The css file has loaded into the app fine and I know the value of stylesheet_name does return what I want because I sent it to a label control and the file name comes up.
I have a table thats created dynamically, the table gets its contents from a custom class I've created that gets statistical data from a database. As the table is generated dynamically, I've put the contents class (the table data) into a session object and I populate the table initially inside a !IsPostback then on the page init I get the data from the session (its empty on the firts page load). I am now getting this error: Multiple controls with the same ID 'controlnamehere' were found. FindControl requires that controls have unique IDs. How can I avoid this?
I am using 5 ,6 user control. I wanted to load diffrent user control on Click of menu bar. Means when I click on first link of Menubar 1 user control should load and 2 loaded when i Click on 2 link of menu bar. How to do that?
Do you think it is wise to load the background-body image dynamically in a CMS application from SQL Server 2005? Granted I would have to generate a sql statement based on size of the page to show the correct image. Anyone run into any pitfalls?