Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Maximizing.ASP.dot.NET.Real.World.ObjectOriented.Development [Electronic resources] - نسخه متنی

Jeffrey Putz

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید






Tying the Look to User Profiles


To make a theme "stick" with a user, you'll need a profile property to store his or her favorite theme name. Going back to our first web.config example in Listing 12.1, you simply need to add a profile property called Theme and set its type to System.String. Regardless of the profile provider you use (unless of course your own custom provider doesn't deal with the Theme property), Listing 12.11 shows how your page can set the theme for the user.

Listing 12.11. Setting the theme for a user with Profile

C#


void Page_PreInit(object sender, EventArgs e)
{
Theme = Profile.Theme;
}

VB.NET


Sub Page_PreInit(sender As Object, e As EventArgs)
Theme = Profile.Theme
End Sub


/ 146