Monday, March 26, 2012

Many user defined controlls

Hi,

i have created Web UI Control. I need to use it many times on one
page.

My soulution was to add this controls in a loop to Panel (in
Page_Load), it doesnt work. I think it is beacause this control doesnt
have runat="server".

Any solutions? Maybe there is simpler ide?

Thanks in advance,
Etam.On 2 Maj, 12:46, etam <odwrot...@.gmail.comwrote:

Quote:

Originally Posted by

Hi,
>
i have created Web UI Control. I need to use it many times on one
page.
>
My soulution was to add this controls in a loop to Panel (in
Page_Load), it doesnt work. I think it is beacause this control doesnt
have runat="server".
>
Any solutions? Maybe there is simpler ide?
>
Thanks in advance,
Etam.


<asp:Panel ID="ProfilesPanel" runat="server" Height="50px"
Width="125px">
</asp:Panel>

and Page_Load:
ProfileInfoCollection pic =
ProfileManager.GetAllProfiles(ProfileAuthenticatio nOption.All);
foreach(ProfileInfo pi in pic) {
ProfileCommon p = (ProfileCommon)ProfileCommon.Create(pi.UserName);
ProfilesPanel.Controls.Add(new ProfileDisplay());
}

0 comments:

Post a Comment