save and retrieve theme in database
how do i save personalized theme that user choose to database and retrieve it back when user login to their page.. please help..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Hazel MahmudPosted Jul 5, 2015, 4:09 AM
{
using (SqlConnection stud = studPortConn.GetStudPortCon())
{
stud.Open();
da.SelectCommand = new SqlCommand("SELECT theme_id FROM User_Theme where user_id = '1773'", stud);
SqlDataReader dr = da.SelectCommand.ExecuteReader();
if (dr.Read())
{
lblthemeID.Text += dr["theme_id"].ToString();
}
stud.Close();
}
}
protected void Page_PreInit(object sender, EventArgs e)
{
//Page.Theme = "Theme1";
if (Session["Theme1"] != null)
{
string Theme1 = Session["Theme1"].ToString();
Page.Theme = Theme1;
}
if (Session["Theme2"] != null)
{
string Theme2 = Session["Theme2"].ToString();
Page.Theme = Theme2;
}
if (Session["Theme3"] != null)
{
string Theme3 = Session["Theme3"].ToString();
Page.Theme = Theme3;
}
if (Session["Theme4"] != null)
{
string Theme4 = Session["Theme4"].ToString();
Page.Theme = Theme4;
}
if (Session["Theme5"] != null)
{
string Theme5 = Session["Theme5"].ToString();
Page.Theme = Theme5;
}
if (Session["Theme6"] != null)
{
string Theme6 = Session["Theme6"].ToString();
Page.Theme = Theme6;
}
if (Session["Theme7"] != null)
{
string Theme7 = Session["Theme7"].ToString();
Page.Theme = Theme7;
}
if (Session["Theme8"] != null)
{
string Theme8 = Session["Theme8"].ToString();
Page.Theme = Theme8;
}
if (Session["Theme9"] != null)
{
string Theme9 = Session["Theme9"].ToString();
Page.Theme = Theme9;
}
if (Session["Theme10"] != null)
{
string Theme10 = Session["Theme10"].ToString();
Page.Theme = Theme10;
}
if (Session["Theme11"] != null)
{
string Theme11 = Session["Theme11"].ToString();
Page.Theme = Theme11;
}
if (Session["Theme12"] != null)
{
string Theme12 = Session["Theme12"].ToString();
Page.Theme = Theme12;
}
Sibeesh VenuPosted Jul 4, 2015, 9:47 PM
Sibeesh VenuPosted Jul 4, 2015, 9:46 PM
$('head').append('');
Hazel MahmudPosted Jul 4, 2015, 9:24 PM
Sibeesh VenuPosted Jun 30, 2015, 1:11 AM