473,765 Members | 2,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using a Custom Server Control inside an ItemTemplate in DataList

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
May 18 '06 #1
2 1336
Ignore intellisense, add a reference of your control in the top,
something like

<%@ Register TagPrefix="cc1" Namespace="name space of own control"
Assembly="assem bly holding the control" %>

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

May 18 '06 #2
Perfect. Thanks!
"Tasos Vogiatzoglou" <tv*****@gmail. com> wrote in message
news:11******** **************@ j73g2000cwa.goo glegroups.com.. .
Ignore intellisense, add a reference of your control in the top,
something like

<%@ Register TagPrefix="cc1" Namespace="name space of own control"
Assembly="assem bly holding the control" %>

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

May 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3014
by: Stephan Bour | last post by:
Hi, I need to validate a text box in a datagrid nested inside a datalist. All I need is to validate that any text is entered in the textbox. However, a requiredfieldvalidator would not do because I want to perform the validation only on the datagrid rows where a check box is checked. Part of the datagrid: <asp:TemplateColumn HeaderText="C #"> <ItemTemplate>
4
3096
by: V. Jenks | last post by:
What seems like a simple thing is apparently not so straightforward? I have a datalist. Inside of that datalist is an <itemtemplate> secion which contains other server controls such as a label, a radiobuttonlist, etc. I'm driving myself insane trying to figure out how to get
3
3090
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are displayed. Can anybody know this issue and help me to resolve this. In past i received the response saying that i should download the image first and then parse the actual response and modify the src attribute of the
5
1137
by: somequestion | last post by:
< uc1:BoardWrite ID="BoardWrite1" CommentId="<%# Eval("CommentId") %>" runat="server" /> this is visual studio 2005 asp.net tag. first it's nor working..but i need this because i will use this usercontrol lots of place in just 1page. so i have to give commentId to BoardWirte control how can i solve this? Bind() method also doesn't work. thankx.
2
3445
by: Hans Merkl | last post by:
Hi, I am trying to use a user control as EditItemTemplate in a DataList. It loads fine but I can't figure out how to bind to the data of the DataList. Here is what I have got so far: //Page_load of my user control protected void Page_Load(object sender, EventArgs e) { IDataItemContainer DataContainer = this.Parent as
1
4323
by: sck10 | last post by:
Hello, I have created a photo gallery of thumbnails using the code below. So far, I got the pictures to show, but now I need to figure out how a viewer can click on the thumbnail and it opens the bigger picture. The bigger file is the same name as the file stored in the array minus the "_mini". So in the datalist, I would need to somehow wrap the image inside of the anchor. Any help with this would be appreciated. Thanks in advance ...
3
1703
by: Jon Paal | last post by:
how do I load controls to the templates for the DataList control. <asp:datalist id="dl1" runat="server" > <ItemTemplate> " how to load control(s) here ????" </ItemTemplate> </asp:datalist>
0
957
by: Charlie | last post by:
Hi: When I add controls to item template in DataList, I only see the stock ASP.NET controls. I would like to use one of my own Custom Server Controls instead. How do I do this in 1.0? Thanks, Charlie
0
963
by: Charlie | last post by:
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. ...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3926
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.