Using a Custom Server Control inside an ItemTemplate in DataList

C

Charlie@CBFC

Hi:

When using templated columns in DataList, ASP.net server controls can be
inserted. Rather than using the base ASP.net server controls, I would like
to use one of my own custom server controls. Example: I have custom server
control that adds a rollover effect to the base Image control. Inside my
ItemTemplate I would like to use it rather than base image control. How do
this? Intellisense only shows me the base controls.

Thanks,
Charlie
 
T

Tasos Vogiatzoglou

Ignore intellisense, add a reference of your control in the top,
something like

<%@ Register TagPrefix="cc1" Namespace="namespace of own control"
Assembly="assembly holding the control" %>

and then add the server control as usuall with <cc1:ComponentClass
runat="server" <other properties> />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top