473,322 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Creating Custom Control with Dynamic Data

Hello,

I am using VB.NET in Visual Studio 2005 to develop ASP.NET 2.0 web
applications. I am developing a control library with all the custom
controls that I can use in my projects. One of the requirement is to
build a custom DropDownList with addition functionalities specific to
my project. When I tried to develop this control I faced a problem
that I have explained below.

I want to add a new property for this custom DropDownList. This
property will take a string value but it must come from a predefiined
set of values. This predefined set is dynamically built from a SQL
Server table and must be shown to the user as available values in the
properties window. I cannot use an enum because the values come from
a table.

Please let me know if someone has any suggestions.

Thanks, Isai.

Oct 4 '07 #1
1 1541
Hi Isai, firstly you might want to try the control building newsgroup
as it's more specialised.
I am using VB.NET in Visual Studio 2005 to develop ASP.NET 2.0 web
applications. I am developing a control library with all the custom
controls that I can use in my projects. One of the requirement is to
build a custom DropDownList with addition functionalities specific to
my project. When I tried to develop this control I faced a problem
that I have explained below.

I want to add a new property for this custom DropDownList. This
property will take a string value but it must come from a predefiined
set of values. This predefined set is dynamically built from a SQL
Server table and must be shown to the user as available values in the
What you mean is, you want to hit the database at design time and fill
in a dropdown list in the VS property editor, so that the developer
user can choose a value?

If so I think you might want to look at the Editor attribute which can
be assigned to the class of property that you want the drop down to
appear for. You're probably going to need to delve into
UITypeEditor...

Hope that's some help
Jim
properties window. I cannot use an enum because the values come from
a table.

Please let me know if someone has any suggestions.

Thanks, Isai.

Oct 4 '07 #2

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

Similar topics

0
by: Mike | last post by:
Hi, I have a class library (dll) in which I defined a class for a custom control (called PlaceHolder). In a separate Web project, I created a custom control (called Template.ascx) that contains...
3
by: Ken Varn | last post by:
I am just starting the process of creating ASP.NET server controls. I have created controls for .NET applications, but have just started with ASP.NET. I am a little confused about some areas that...
1
by: philipl | last post by:
hi, i have a datagrid which display custom controls when user clicks edit, changing data. I am using customvalidator to validate this control. I can get validation of user input to work no...
1
by: amirmira | last post by:
I have a multithreaded application is ASP.NET that checks the status of a process every 2 seconds. After the thread has completed, the values of dynamically added controls need to be changed...
5
by: Alan Silver | last post by:
Hello, I have a products page that takes a product ID in the query string. Based on the product details (from a database), the page then loads up one of a number of custom controls, calls a...
9
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have...
8
by: Radu | last post by:
Hi. I have an ASP control on my page: <asp:Calendar ID="calStart" ................ Etc </asp:Calendar> and I have a Custom Validator defined as <asp:CustomValidator
0
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in...
1
by: Abdo Haji-Ali | last post by:
Previously I used to create user controls if I wanted to use a specific set of controls in multiple pages, however I want to deploy my control in other applications so I thought of creating custom...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.