Ask a Question related to ASP.NET General, Design and Development.
-
Barry #1
Difference between a custom template and a user control?
I have a DataList in which I need to dynamically load a
SelectedItemTemplate. However, I ended up turning the template into a
User Control because I needed code behind. The reason I did this was
because I have another DataList inside the template/control that has to
be bound to a function call and I couldn't figure out how to do this in
a template.
I'm still using MyDataList.SelectedItemTemplate =
LoadTemplate("./Path/To/MyControl.ascx"), which sort-of works. The
problem I'm having is that I want an item in my template/control to
reload the top Datalist with a different template/control when a certain
item is clicked in the sub-DataList and it doesn't seem to work.
Is there a difference between the two technologies? Did I not need to
use a User Control to get what I needed? I feel like I've read a ton on
these things and I get a little more confused every day. Can anyone
point me in the right direction?
TIA,
Barry
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Barry Guest
-
ASP.NET 2.0 User Control that implements a template
I have created a user control in ASP.NET 2.0 that utilizes ITemplate. The control has no issues (displays fine in a browser) until I try to go into... -
How to custom gridview control if it derive from web user control?
How to custom gridview control (modify column templates) if it derived from web user control? I have a web user control which contains one... -
Events in a custom template control
I have written a template control which contains a button. I have added a public event to the control which I raise on the button's Click event. In... -
Custom Server Control works on page but not User Control...why?
I'm developing the DevEdit.NET server control (an online HTML editor - www.devedit.com) but there's an extremely bizarre bug. The control runs fine... -
Page Load fired 3 times Web user control is embedded in a custom control
Hi, I have built a custom control that build a table with 3 cells in it. The custom control is designed to add all child controls to cell#2,... -
Natty Gur #2
Re: Difference between a custom template and a user control?
Hi,
you can use public functions from the code behind to set Template
attribute values :
<ITEMTEMPLATE>
<P width="<%#New
Unit(Container.Width)%>"><%#GetSystemName(Containe r.DataItem)%></P>
</ITEMTEMPLATE>
Hope it helps you.
Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest



Reply With Quote

