Fredrik Normén's Blog - NSQUARED²
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

Microsoft Most Valuable Professional
     .Net Framework - ASP.Net - Architecture - Development
NOTE: This list of posts will only list the 15 latest posts, to see the rest, select from the Archives located in the menu to the left. The RSS will only list the 10 lastest posts.
New version of the WebPart Components

Category:  WebPart Components

I have updated the WebPart Components for the July CTP.

 

I have changed the SqlPersonalizationProvider shipped with the WebPart Component. The previous version, the WebPart personalization data was saved and retrieved based on the whole raw URL (Url including all querystrings). In this version you can specify which querystring parameters that should be included. So now you can have extra querystring parameters added to the page, and the personalization can ignore them. If you still want to save the personalization based on the raw URL, you can do so by disable the new feature.

 

The WebPart personalization providers shipped with ASP.Net 2.0, will by default use the URL as an identifier to get and store personalized data. But it will not include querystrings. The Provider shipped with the WebPart Components, can include querystrings. To specify which querystrings that should be used, you simply add the varyByParams attribute to the provider, and use a comma separated list with the querystring parameters that should be included. If you want to include all querysteings, just set the varyByParams to “none”.

 

<webParts>

   <personalization defaultProvider="Nsquared2SqlPersonalizationProvider">

      <providers>

         <add

             name="Nsquared2SqlPersonalizationProvider"

             type="Nsquared2.Web.UI.WebControls.WebParts.SqlPersonalizationProvider, Nsquared2.Web"

             connectionStringName="LocalSqlServer"

             varyByParams="page">

                </add>

            </providers>

        </personalization>

        </webParts>

Posted: Monday, August 15, 2005 - 12:06 GMT+1    Print     E-mail    Comments (3)
   fredrik.nsquared2.com - 2007