473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Personalization of Page and Webpart

Bei
Now I'm facing a requirement that every users can personalize their
own web parts, and there is a administrator who has rights
1, to publish a 'personalization' of a single web part to all users in
his group.
2, to a 'personalization' of a whole page.

my solution to the first problem is: Add a new class inherits the
webpart class and implements the IPersonalizable Interface and write
code below to personlize:
void IPersonalizable.Load(PersonalizationDictionary state)
{

PersonalizationEntry entry1 = state["someKey"] as
PersonalizationEntry;
if (entry1 != null)
someValue = (someType)entry1 .Value;
PersonalizationEntry entry2 = state["someOtherKey"] as
PersonalizationEntry;
if (entry2 != null)
someOtherValue = (someOtherType)entry2 .Value;
}

void IPersonalizable.Save(PersonalizationDictionary state)
{
PersonalizationEntry entry1= new
PersonalizationEntry(someValue,
PersonalizationScope.Shared);
state.Add("someKey", entry1);
PersonalizationEntry entry2= new
PersonalizationEntry(someOtherValue,
PersonalizationScope.User);
state.Add("someOtherKey", entry2);
}

When loading with the Webpartmange.Personalization.Scope==User, the
entry1 with the scope 'shared' are always null, while the entry2 with
'User' scope are not null. Can any one give me a detail explanation??
I have no idea about publishing the personalization of the who page,
especially how to <b>customizing</bthis.

any helps are appreciated!

Apr 5 '07 #1
0 1053

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ctadlock | last post by:
In .NET 2.0 web parts can be customized for all users (PersonalizationScope.Shared) or for each specific user (PersonalizationScope.User); is there any way to personalize web parts based on a...
1
by: Leroy | last post by:
I'm trying to implement a site whereby administrators can setup a layout for a webpart site that affects all users, then individual users can personalize their pages. I have configured the site...
9
by: SlimFlem | last post by:
Is this possible? My entire web site is being built dynamically using WebPart's and a lot of it will be anonymous. How do I load these parts dynamically using WebPartManager.AddWebPart() and not...
2
by: Mats Lycken | last post by:
Hi, I have a question about webparts in master pages. If I add a webpart to a webpartzone located in a master page will that webpart be available to all .aspx pages that uses that master page or...
2
by: bradgatewood | last post by:
I am in the process of developing a highly customizable application and I'm looking for a way to allow personalization by role. This is different than shared scope in the fact that I want to allow...
3
by: Electrified Research | last post by:
So I've been playing with WebParts. Very cool stuff. The personalization scope has "Shared" and "User". "Shared" allows for an admin to customize a page and how other users see that page. ...
2
by: Roger23 | last post by:
I have a requirement where I need to remove or disable the entire personalization feature of my web application. I am not allowed to have a SQL express on my web server and I am not allowed to have...
1
by: fscali | last post by:
Hi, in asp.net 2.0, is there any out of the box provider that I can use in order to persist to a SQL Express Database some site settings? I have a webpart page where only authorized users can...
0
by: =?Utf-8?B?U2hhbg==?= | last post by:
Hi, I need to develop a web-application, which use form based authentication. In this application, administrator can create a role and add users to the role. I have a requirement where the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.