473,394 Members | 1,752 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,394 software developers and data experts.

Persisting Programmatically Added WebParts

Hi,

How can I persist a webpart that is added to a page using the webpart
managers addWebPart method in asp.net 2.0. My intention is to give the
user the ability to load a predetermined collection of web parts by
selecting a preset. Thanks in advance..

Mar 3 '06 #1
3 1373
DWS
Imran,
Search for the following
enterSharedScope
PersonalizationScope.Shared
Personalization.ToggleScope

You need to make changes in shared scope then any changes or webparts you
add will be starting point for all other users. If you add webpart then all
other users will have that webpart as a starting point. As far as making a
selection for the users you could make a couple different pages.

My entire Dev Web Site is made of webparts. You are welcome to register and
check out how it works as a user, click the tree in the top left to enter
edit mode. click the folder icons to put webparts into your webpart folders.
http://www.DWS400.com

Good Luck
DWS
"Imran" wrote:
Hi,

How can I persist a webpart that is added to a page using the webpart
managers addWebPart method in asp.net 2.0. My intention is to give the
user the ability to load a predetermined collection of web parts by
selecting a preset. Thanks in advance..

Mar 3 '06 #2
Hi,

Thanks for the reply DWS, but I think my problem is not with the scope.
What I want is to insert a webpart programmatically once when a user
clicks something and have it persist for that particular user without
needing to add it each time the user visits the page. Something akin to
what the catalog part does now. Thanks..

Mar 6 '06 #3

Hi,

It seems we have to extend the webpart manager and call the method
SetPersonalizationdirty() to persist dynamically added webparts.

Mar 8 '06 #4

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

Similar topics

2
by: Citoyen du Monde | last post by:
Trying to get some ideas on a simple javascript project (to teach myself the language). I want to develop a client-side vocabulary practice application that would allow users to enter their own...
1
by: Astera | last post by:
I seem to be having a problem using web parts after the beta 2 release. Any time I try to have the WebPartManager on any page, I get the exception listed below. I've gone through the steps listed...
2
by: xenophon | last post by:
I added a Hidden Form Field to a form in the code behind. The value is being set in JavaScript client-side, but it is not persisting to the server in the PostBack. I know the value is being set...
5
by: Dick | last post by:
I have a GridView bound to an ObjectDataSource. I have a Button that calls GridView.DataBind. I want the row that is selected before the DataBind to still be selected afterwards. This happens...
2
by: ChrisCicc | last post by:
Hi All, I got a real doozy here. I have read hundreds upon hundreds of forum posts and found numerous others who have replicated this problem, but have yet to find a solution. Through testing I have...
4
by: | last post by:
Hi all, I want to create a method that does the following: 1) Programmatically instantiate a new XmlDataSource control 2) For each file in a named directory, make a "FileSystemItem" element 3)...
10
by: Allan Ebdrup | last post by:
I have a custom server web control that inserts another custom web server control in a templated child control (a wisard that inserts a header in its wizardstep) Now after switching to design view...
3
by: clintonG | last post by:
Why don't we see more WebParts being used on the web? SharePoint gets all the fun? And what are the prevailing opinions be they what they may about the use of WebParts rather than WPF when the...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.