webparts personalization

Last post 10-20-2006 4:32 AM by BCdotNET. 2 replies.

Sort Posts:

  • webparts personalization

    10-19-2006, 6:01 AM
    • Member
      265 point Member
    • arunpulikkan
    • Member since 07-12-2006, 9:44 AM
    • India
    • Posts 151

     

     

     

     

    hi

    i have a set of webparts for each loan.first i selected homeloan and loaded all the webparts like

    for(-----------------)

    {

    usercontrol = "ProviderFactory." + usercontrol;//providerfactory is the project name where i wrote all the webparts

    Type objType = BuildManager.GetType(usercontrol, true, true);

    WebPart myPart = (WebPart)Activator.CreateInstance(objType);

    MyWebpartManager.AddWebPart(myPart, WebPartZone1, 3);

     }

    and it will load all the webparts into the aspx page and if i select other loantype then the webparts for the selectedloan and the previous webparts will load into the aspx page.

    actually i want only the webparts for the selected laontype

    what can i do???

    Thanks

    Arun

     

    Thanks,
  • Re: webparts personalization

    10-19-2006, 6:33 AM
    • All-Star
      29,644 point All-Star
    • Fredrik N
    • Member since 06-22-2002, 5:03 AM
    • Sweden
    • Posts 5,334
    • TrustedFriends-MVPs
    When you use personalization all the WebParts that you add, will be saved and displayed next time. So when you add one, and add another one later, both will be displayed,but your code probably still only add one. So what you need to do if you don't want to have the other WebPart that you have added before, is to remove it. I assume that is the problem if you only want to show the selected webpart and not everyone that you have selected before!?
    /Fredrik Normén - fredrikn @ twitter

    ASPInsider

    Microsoft MVP, MCSD, MCAD, MCT

    ASPInsiders
    My Blog
  • Re: webparts personalization

    10-20-2006, 4:32 AM
    • Member
      172 point Member
    • BCdotNET
    • Member since 09-05-2006, 9:46 AM
    • Posts 39
    Look at my reply in http://forums.asp.net/thread/1401652.aspx . IMHO you should be able to use the ideas behind that to do what you want, i.e. get the webparts for the selected loan type, then load them into the custom CatalogPart. The user should only see the relevant Webparts. Mind you, these will be in the CatalogPart in the CatalogZone's ZoneTemplate, so he'll need to add them to his aspx page first.
    Life would be a lot easier if we could take a look at the source code.
Page 1 of 1 (3 items)