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
Similar Messages:
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
Aug 20, 2010
Can ASP.NET themes be used per user session ? Ex : For one user,User theme called "Green" and for another user Use the theme called "Red". Or themes are for the enire web app ?
View 1 Replies
Mar 9, 2010
I am doing a community website. Assume that I am giving an option to all my users to choose a theme. That we happen see on websites like Orkut , Gmail etc..Actually we can keep only one theme inside the web config right ?. During dynamic change all the other user's themes will also change. How to avoid this?
View 1 Replies
Mar 5, 2010
I recently switched computers and now when I attempt to run my web project on my local machine I am receiving:[PolicyException: Required permissions cannot be acquired.]But if I publish it to my website everything seems to work correctly. I have done some research on this and it appears to be a security issue with one of the assemblies but I'm unsure which and how to go about figuring out which it is.Also, when I get on the Web Site Administration Tool and under the security tab I am seeing:"There is a problem with your selected data store. This can be cauesd by an invalid server name or credentials, or by insufficient permission. IT can also be caused by the role manager feature not being enabled.
View 4 Replies
Jan 26, 2011
Im doing a project which requires me to store the survey results to database.
For the options, I am using the radio button list.
However, I have problems storing the selected option back to database.
Is there any solution to it? Im using visual studio C#! :)
View 5 Replies
Jan 4, 2011
I must be doing something wrong, but this makes sense to me. I have a Listbox loaded with tons of items from a datasource. A user clicks one of these items it grabs the selectedindex (an integer) and stores it in a HiddenField (works fine).
Now when the page does a complete a refresh (after postback) I want the ListBox to go back to that selectedindex that is in the HiddenField. Problem is, it seems that after postback the HiddenField is empty? Then I thought about storing the value in an Integer variable in code, but that is simply coming up as a zero at all times.
Question 1: What is the best/simplest way to do this?
Question 2: How?
I am currently grabbing it on selectedindex change
[Code]....
View 2 Replies
Oct 5, 2012
i have built a simple shopping cart ... like below
Item
Qty
Price
Butter Chicken
View 1 Replies
Mar 15, 2011
I am working in asp.net 3.5 with c# and sqlserver 2005 as database. I my project i have to select some of the checkbox of a gridview and update the database according to that. I want to store all the selected box in a arraylist and update the database according to the selected list . But i am not getting how to proceed.
View 3 Replies
Nov 8, 2010
I have a listbox control data bound to a data source and I want to be able to get the value of each selected item so that I can use that information to form an insert query for another table. In other words be able to select a few items out of the returned list and get the selected value of each. I tried using a for each statement but came up with some strange numbers.
View 2 Replies
Dec 1, 2010
Is it possible to perform user management (store user info, login , logout etc) without using session or cookie?
View 3 Replies
Nov 10, 2010
Our application lets the administrator create new users. Since the administrator is logged in, I have set Logincreateduser = false so that the administrator is not logged out even after creating the new user.
The problem is :I need the userid of the newly created user to store additional details of the user in another database table. I see that i can get the username using Createuserwizard1.username; but how do I get the userID?
View 2 Replies
Aug 12, 2010
I have a custom membership user class and custom MembershipProvider working against database. Due to security reasons the user passwords are stored in the database as hashed values. So my procedure
public override bool ValidateUser(string username, string password) is
{
//select hashed password from db
return (EncodePassword(password) == dbpassword)
}
[code]....
View 4 Replies
May 15, 2010
Dim ename As String = DropDownList.SelectedItem.Value
this statement is'nt working
View 1 Replies
Sep 18, 2010
What is the best way to keep track of user specific information?
I want to show information in querys etc based upon specific properties, for instance a users belongs to a dealer, and that dealer has an ID.
So is it a good way to store that dealer ID in a session variable or should I consider a other option to use this on multiple pages.
View 7 Replies
May 15, 2010
the dropdown list is showing data from database, but how to retrieve the selected value and store it in a session variable??
View 1 Replies
Sep 21, 2010
[Code]....
Dynamically created calendar does not store selected value
View 1 Replies
Oct 27, 2010
iam creating a customized dashboard using web parts and i am new in web parts..i wanna a way to store user setting in XML file .. how can i achieve that ?
View 4 Replies
Jan 5, 2012
I am have done a basic asp.net application User Module with out using any authentication classes.
Now I need to store last user login details in my asp page when user performs any operation. and need to show to other User who next login that ( the last user has made changes before ).
View 1 Replies
Jun 16, 2015
I want to kill the session on the browser closing or tab closing and store the Logout time in database using Asp.Net.
I have coded that code in Global.asax page which works only when we Click on Logout Button .but it's not worked on the tab closing /Browser closing.
void Session_End(object sender, EventArgs e) {
SqlTransaction transaction = null;
using (SqlConnection con = new SqlConnection(conn)) {
con.Open();
SqlCommand cmd = con.CreateCommand();
transaction = con.BeginTransaction("Transactions");
[Code] ....
View 1 Replies
Jan 26, 2010
I am currently trying to implement a small class attendance system, where the student names are taken from a database, stored in a List<Student>, and bound to a Repeater control. Each row of the Repeater contains two columns: The first is the student's name, and the remaining column contains a RadioButtonList with three ListItems (Present, Absent, Sick).Now, once the user presses "Submit", I want to be able to store their attendance status based on the user selection. However, after submission, the SelectedIndex is always 0, no matter what option is selected.
View 8 Replies
Aug 18, 2015
i have read your article on aspsnippets.com. Multilingual Website and i have implemented that i works good .but there is new problem arrising. suppose my default language is english set in internet option so the whenever website reloaded or redirected then all content will show in english language but
when i changed it to hindi then current webpage converted to hindi but after that if i pressed any button on current page or i redirected to any other link of particular website then again hindi is converted to english.
View 1 Replies
Jan 26, 2011
In my pages, the first thing I do when a page is being displayed is query a table called user preferences. I'm doing this for every page and I was wondering what are the options available to avoid repeating this query as the user jumps from page to page on my application.
View 1 Replies
Feb 15, 2011
When the user logs in, I want to store his userID in the session with
HttpContext.Current.Session["UserID"] = 2354; (this is just a hard-coded example)
Then, when I run a page method, if I do
var test = HttpContext.Current.Session["UserID"];
will the variable test hold the value I stored when he logged in?
If this is a correct way of doing it, how do I access the session when I receive a call from a page method? I want to put the test =... line in a page method to identify which user the request is coming from.
View 5 Replies
Feb 25, 2011
Using SQL and C#. I have a gridview with a template field. I need to modify the some items in the gridview when the user selects a given record and store the values back in the database. ProjectID is the unique key in the database.Gridview is done as a table. How can I do it? Here is my grid view implementation.
[Code]....
View 3 Replies