Category Archives: WebPartManager

[RESOLVED] Which table does contain information about web parts

Hi

 

Which table does contain information about web parts?

For example: if I minimize web part zone and I again connect to my web application (even after server restart) this web part zone still will be minimized.

In which table this information is stored?

 

Regards

it is saved in User profile table  ( aspnetdb)   -  dbo.aspnet_Profile table

I think I do not understand something.

I checked this table and this table is empty (I checked aspnetdb database) but information about webpart controls in not lost, after IIS restart I see previously saved settings.

 

How can I check in which exactly database these information are stored?

I my web.config file there are no connection strings so how WebPartManager knows in which database store these information? Can I use my own connection string to specify localization than default?

Hi,

kicaj

I checked this table and this table is empty (I checked aspnetdb database) but information about webpart controls in not lost, after IIS restart I see previously saved settings.

 

Do you use the default personalization, profile provider or a custom provider?

As far as I know, by default, all the ASP.NET 2.0 applciation services(include membership, rolemanager, profile, personalization ...)are using Sql provider and the connection string is pointing to a local sqlexpress database file(in App_Data folder) or MS SQL Server.

Such as:

 <profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider"  type="System.Web.Profile.SqlProfileProvider" connectionStringName="NorthwindConnectionString" applicationName="/"/>
      </providers>
      <properties>
        <add name="LastName" allowAnonymous="true" type="System.String"/>
        <add name="Sex" allowAnonymous="true" type="System.String"/>
        <add name="Age"  allowAnonymous="true" type="System.Int16"/>
      </properties>
    </profile>

Here's some walkthrough for Personalization with Profiles and Web Parts:

http://www.informit.com/articles/article.aspx?p=703789

http://msdn.microsoft.com/en-us/library/aa479037.aspx

 

kicaj

I my web.config file there are no connection strings so how WebPartManager knows in which database store these information

And also I found some articles refer that Web Parts Manager personalization without SQLExpress, you can check it:

http://benharrell.wordpress.com/2006/07/26/web-parts-manager-personalization-without-sqlexpress/

http://www.kowitz.net/archive/2006/05/01/webparts-without-sqlexpress-or-sqlserver

Hope this can help you.

[RESOLVED] WebParts – how to open WebPartZone

Hi!

 

I am not very familiar with web parts.

When I click link “Close” on WebPartZone all this control disappear. How can open again WebPartZone that has been closed before?

 

Regards

I'm assuming you were refering to the WebPart that is being closed from the WebPartZone. If so then basically all closed WebParts are stored in the WebParts PageCatalogPart.. If you wanted to open/add the Webparts that you have closed in the WebZone then you need to use the PageCatalog control.

But can I have just button with click event handler and code in this handler that will open previously closed webpartzone?

You can loop through the WebPartManager WebParts collection and then determine the previous closed WebParts and then use the AddWebPart method of WebPartManager to add WebParts to the WebPartZone:

http://geekswithblogs.net/dotNETvinz/archive/2008/09/11/webpart-count-the-number-of-closed-webparts-within-pagecatalogpart.aspx

[RESOLVED] How to use ProxyWebPartManager Control

Hi,

Someone tells me how we can use ProxyWebPartManager Control in a website?(please try to show by Video Tutorial)

 

[RESOLVED] Webparts, reset all users personalizations settings

Hi all.

I'm looking at asp:webpart to implement some personalization on a startpage for a insurance web app.(no Sharepoint) I have read some and made some tests but I have at least one thing that I don't understand.

In some cases I wanted to reset all users personalizations to the page default settings. So to speak, I will do it in an authoritarian way.

How can I do this? Database manipulation? Which table in the database? Or is there another way?

Rgds

Roger

 

Hi,

As far as I know, web parts use some providers to store and retrieve user setting in database. It calld Personalization Providers. ASP.NET ships with one Web Parts personalization provider: SqlPersonalizationProvider, which stores personalization data in Microsoft SQL Server and Microsoft SQL Server Express databases.

If you use SqlPersonalizationProvider in your site. You can manipulate sql data schema to implement your requirement.

Check these links:

http://msdn.microsoft.com/en-us/library/aa478955.aspx

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.sqlpersonalizationprovider.aspx

Hope this can help you.

It helped me a lot. I understand how this provider works now. Thanks!

As example I can clear all user (scope=user) on a page like this(if I'm logged in as an admin)

**VB**       

        Dim mgr As WebPartManager
        mgr = WebPartManager.GetCurrentWebPartManager(Page)
        Dim persScope As PersonalizationScope = mgr.Personalization.Scope
        PersonalizationAdministration.ResetAllState(persScope)

 

/ru

[RESOLVED] Web Part - single click edit

I am trying to implement a one click edit capability in a web part.  I want the edit verb to always be visiable and enter edit mode when the user clicks. 

I have not found a way to make the edit verb visible in browse mode.

 

I have created a custom verb called edit that will display in browse mode.  When this is clicked I put the page in edit mode, but I cannot figure out how to 'select' the web part. 

I know which part was clicked, it is the one whose event handler fires, but I do not know how to make it the selected webPart.  The selectedWebPart property of the WebPartManager is ready only.

 

Any ideas?

 

Thanks,

   Don

I solved the issue by putting the page in Edit mode all the time.  I hid the webPartZone header and it looks like broswe mode.