Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


How do I implement a custom control (extended DropDownList) on a web form?

Posted on 2006-04-05
Medium Priority
Last Modified: 2008-02-01
I have a custom control MyDropDownList that extends DropDownList (i.e. it is not a UserControl it is a "DropDownList").
How do I declare this control on a web form?
Question by:smacca
LVL 43

Accepted Solution

TimCottee earned 2000 total points
ID: 16380361
Hi smacca,

<%@ Register TagPrefix="MyDDL" Namespace="MyApp.MyNameSpace" Assembly="MyAssembly" %>

Then simply use:

<MyDDL:MyDropDownList runat="Server" />

With any attributes you have included there.

Tim Cottee
LVL 10

Expert Comment

ID: 16380768


add rweference in your project (If required)

<%@ Register TagPrefix="XYZ" Namespace="YourProject.Web.Controls.CustomControl" Assembly="YourCustomControl" %>

use like this <XYZ:datepicker id="DatePicker1"</XYZ:datepicker>


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month15 days, 19 hours left to enroll

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question