how the controls in the webpart zone template are reconginsed

Last post 07-05-2009 11:23 PM by vinz. 5 replies.

Sort Posts:

  • how the controls in the webpart zone template are reconginsed

    07-04-2009, 12:55 AM

    iam placing grids in the webparts zones even i binded data to the grid also it is not displaying ..so how can i find the contols in the vb.net code when they are in catalog--declarative catalog zone and any webparts zones..how can assign data to them using vb code

  • Re: how the controls in the webpart zone template are reconginsed

    07-04-2009, 5:49 AM
    Answer

            foreach (WebPart wp in WebPartZone1.WebParts)
            {
                GridView gv = wp.FindControl("your gridview id");
            }


    Give a man a fish and you feed him for a day. Teach a man to fish and you feed him forever.
  • Re: how the controls in the webpart zone template are reconginsed

    07-04-2009, 6:57 AM

     hi thnks for ur reply

    i hv a doubt when user selects edit mode and change the grid then how i can handle this situation...can i write this same code for page catalog also

  • Re: how the controls in the webpart zone template are reconginsed

    07-04-2009, 10:04 AM
    • All-Star
      89,116 point All-Star
    • vinz
    • Member since 10-05-2007, 11:47 AM
    • Cebu, Philippines
    • Posts 13,508
    • TrustedFriends-MVPs

    jagadeesh_sanapala:
    iam placing grids in the webparts zones even i binded data to the grid also it is not displaying ..so how can i find the contols in the vb.net code when they are in catalog--declarative catalog zone and any webparts zones..how can assign data t

    The easiest thing that I could think of is to use UserControl as Webparts, Place the GridView within the UserControl and do the logic there like Binding etc..

    Regards, Vinz
    SDE |Microsoft MVP - ASP/ASP.NET


    ~Currently looking for an overseas job opportunity~
  • Re: how the controls in the webpart zone template are reconginsed

    07-04-2009, 12:32 PM

    hi could guide me in this regard howto use user control as web parts

  • Re: how the controls in the webpart zone template are reconginsed

    07-05-2009, 11:23 PM
    Answer
    • All-Star
      89,116 point All-Star
    • vinz
    • Member since 10-05-2007, 11:47 AM
    • Cebu, Philippines
    • Posts 13,508
    • TrustedFriends-MVPs

    jagadeesh_sanapala:
    hi could guide me in this regard howto use user control as web parts

    You can refer to the following links below on how to create a UserControl as WebParts:

    How to: Treat a User Control as a Web Parts Control 

    How to video: Building Web Parts with User Controls and AJAX


    Regards, Vinz
    SDE |Microsoft MVP - ASP/ASP.NET


    ~Currently looking for an overseas job opportunity~
Page 1 of 1 (6 items)