Web Forms :: Users To Change The Theme Of Site?
Feb 2, 2011this is my code, i want my users to change the theme of my site.
[Code]....
this is my code, i want my users to change the theme of my site.
[Code]....
I need to change website theme (css) by clicking button on Master Page.
protected virtual CSSClick (_sender : object, _e : System.EventArgs) : void
{
//Session("Theme") = "Advanced";
}
Google & MSDN didn't gave me the answer :( So no matters on C# or VB.NET , just how to make it ?
I am now in process doing theme for my web application.
This is how i want my Theme work :Whenever user choose to change the theme, the whole web site theme should changed accrodingly.
Most of the examples that i find out online require to assign the theme in Page_PreInit event in every page. The theme name is store in session variable.
My concern is that is there anyway to assign particular theme to whole web site without having assing it to every page and store the theme into session variable.
I have a few sites that use the same application but use details to populate the site content such as title, logo and theme based on the URL. These details are stored in a database.
What is the best way to populate these details. I was thinking this should be done in the Global.asax rather then my page.master
I have a master page that is used for all the sites and had the code called ther but it might be better to do the database calls in Global rather then in the master page?
The theme I'm using is not working in Visual Web Developer, I have the following code in place:
<%@
Page
Theme="MyTheme"
Language="VB"
AutoEventWireup="false"
CodeFile="Default2.aspx.vb"
Inherits="Default2" %>
the theme is getting applied to the live site.
I'll use a default Theme in the web.config
<pages styleSheetTheme="deftheme">
But on a admin directory, i use a different theme. So i change the aspx file header:
theme="themeAdmin"
But right now he uses both themes. I would like to change it so in the admin directory he should use 1 theme and not the default one. How can i change that ?
of course by deleting it from the web.config and adding it to all other aspx files. But i want to use it in the web.config for the deftheme items.
We have a problem on a new server where disabling a themed button loses its theme. This happens consistently on all buttons now.
We just switched to a new iis server 7.5 using asp.net framework 4.0
Before, the buttons through out the website have a nice style/theme. These are not set inside each button and there are no classes set specifically for buttons I dont think but I believe inherit the theme from I believe the web.config in either:
All the buttons did display a nice light blue gradient, and when disabled they go a few shades lighter blue
For some reason now in .net framework 4.0 all disabled buttons seem to lose their theme and become the default grey color. Enabling them again brings its theme back
why the disabled button would look different now?
my question is i want to change the colors of my sites on dynamically and also images like
In this website their is one panal is given at left middle side and u can change the color of websites.
i want exactly this type
i wanna learn how to nice appearance my mvc sites. for example i am writing an application vs2010 standart theme of mvc. how can i change css file. do you know nice theme css about this. how can i develope my site design. css knowlange..
View 1 RepliesI would like to change a Theme in an ASP.NET web application, depending on the login credentials. So, if user1 logs in, then the Theme will automatically be set to say User1Theme. And if user2 logs in, then the theme will automatically be set to User2Theme. Otherwise, I would like the theme to be set to DefaultTheme.
View 4 RepliesI need to change the css and image path based on theme selected..
to achieve it, it required to add code in preinit event in very page to change the page.theme
is there a way where the same can be achieved in master page itself instead of using preinit event in all pages ??
in all pages in have used
MasterPageFile
="~/common/MasterPage.master"
Theme="default"
I tried this link but I wonder is it possible doing the same thing without page refresh?
View 1 Replies[Code]....
after successful creation of 3 users on my web site now cannot create users
I've been using an asp 3.0 widget for this purpose , but it been broken for a while and rather than get it back up, I'd love o get a native asp.net solution, can any one point me in the right direction pleaseI once wrote some asp.net code to do this, but the permissions on the server, which I found to be common every where prevented asp.net native picture upload, perhaps i got it wrong, well now I wanna fix itI need the code to work in a shared hosting IIS 7 environment. I use vb.net, but can usually convert c# to vb.net
View 1 Repliestutorials or any easy way to change(customize) the YAF.
Change page layout .
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.
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.
Update :
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 active in publish process is usable in all of 5 versions and other 4 themes are un-usable Actually the main question is that why changes in Web.Config need a different publish while it is XML and do not need a complie. I should Add this note that, App_Theme include all of 5 themes so that all of them Compiles and are ready to use
This is the way I publish the application
Photo Link
Update 2
here IFound the exact problem reported by someone else. he resolve the problem but I can't underestand how he resolved this Issue.
I have an application that uses the ASPNET role provider.My SQL Server crashed so I took a backup of the database and restored it to a new SQL Server and changed the db connection string to that server.The web site runs but no users can login to the site.Is there something that I should have done when the db was on the other server?
View 6 RepliesImagine an ASP.NET application with several theme defined within it. How can I change theme of total application (not just a single page) dynamically. I know it is possible through <pages Theme="Themename" /> in web.config. But I want to be able to change it dynamically. How shpuld I do it?
View 2 RepliesYou must have noticed one link in yahoo.com, msn.com or other popular websites named "Page Options". When you click this link you get a popup displaying different small several color icons. After clicking one of these icons your page theme changes without entire page refresh. Now you are able to see the same page with different look and feel.
How does it happen and what it takes to do it? Is this possible in ASP.NET? If yes, how to do it?
I have a customrize control (GridView)
I am trying to add theme for GridView
<asp:GridView ID="GridView1" runat="server" SkinID="GVfour"> // this is work
<JJ:RxGridView ID="JJGV" runat="server" SkinID="GVfour" ... > // this is my custom control , skin wonk work , can't findout the Skin named GVfour
this customrized control was not written by me... I just guess the problem may be the render code..
I found out the customrized control alerady assign Css Style on Gridview when OnPreRender
like this
[Code]....
I also tryied to change skinid on page_preInit
which will return error because , gridview is null..
I have a background set of images that is called randomly.It changes each time a user opens a new page and refreshes the same page.Not 100% of what I want.
Ideally I would like a random image to be shown each time a user comes to the site but not on every page.
Is there a way to set the image per the session a users visits the site instead of each page?
Current code
SqlConnection connection = null;
connection = new SqlConnection(ConfigurationManager.ConnectionStrings["PSI_DB_1ConnectionString"].ConnectionString.ToString());
connection.Open();
int id = Convert.ToInt32(Request.QueryString["id"]);
string SQLquery ="";
if (id == 0)
{
SQLquery = "Select Top 1 ImageData,ImageType from WebBGImages ORDER BY NEWID()";
}
else
{
SQLquery = string.Concat("Select ImageData,ImageType from WebBGImages where ImageID=",id);
}
SqlCommand Cmd = new SqlCommand(SQLquery, connection);
SqlDataReader Dr = Cmd.ExecuteReader();
if (Dr.HasRows)
{
while (Dr.Read())
{
Byte[] bytes = ((Byte[])Dr["ImageData"]);
Response.Buffer = true;
Response.Charset = "";
Response.ContentType = Dr["ImageType"].ToString();
Response.BinaryWrite(bytes);
Response.End();
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.BinaryWrite(bytes);
}
}
Response.Flush();
Response.End();
Cmd.Dispose();
connection.Close();
connection.Dispose();
I want to change complete theme of an open source project "project.net". how to change overall theme into custom theme.
NOTE: i already done with coloring and images change by CSS etc... my question is about change theme structure. e.g. and beautiful header in new theme. Accordion on left navigation etc.
I have looked and so far not been able to find the answer. When a user creates a new account i want the user to be automatically logged into the site as opposed to just being redirected to the log in page. I am able to create the users but am unsuccessful at finding logging them in.
View 1 Repliesi lunched an asp.net web-site. the main idea in the site is that:the site shows the same page, but on each next button the user clicks, the pictures in the site change randomly. im working with postback and sessions.
i noticed that when a few users try to log into my site - their sessions are merging. meaning, the first picture presented is diffrent but the second picture is the same for all the users, and so on... (moreover, pictures that appears in the begining appearing again even thow i don't allw it in my code)when i tried to debug the site locally, the random function works perfectly and there were no such problems. it haapens only when 2 users and more log into my site.
I want to find out if users have visited my site in the last couple of days. i did not put Google analytics so I was wondering if there are any logs of IIS which log if a user has visited or not?
View 1 Replies