Good afternoon,
I am trying to add a custom .ASP web control to my Visual Studio 2005 web application project.
I am modifying the existing application, and am still a bit new to the whole process.
I'm trying to use comboboxes, and discovered there are no default ones built in.
Anyway, the one I am using is based on the dropdownlist web control:
http://www.codeproject.com/KB/custom-controls/comboboxcontrol.aspx
I've tried to use MSDN reference and other information from the web on how to do this, but haven't had any luck...
What I did so far:
Project->Added a custom class->put the code from the "ComboBox.cs" file in here, and named the file "combobox"
Placed a copy of the Vortex.Web.UI.WebControls.dll in the BIN directory of the project.
On the particular webpage where I used the combobox, I put the reference in:
<%@ Register TagPrefix="vortex" Namespace="Vortex.Web.UI.WebControls" Assembly="Vortex.Web.UI.WebControls" %>
My usage of this control is very similar to the example included,
<vortex:combobox runat="server" enableautofill="true">
<asp:listitem runat="server" text="one fine day" value="one"></asp:listitem>
<asp:listitem runat="server" text="two of a kind" value="two"></asp:listitem>
<asp:listitem runat="server" text="three blind mice" value="three"></asp:listitem>
</vortex:combobox>
However, I get the following error:
The base class includes the field 'Combobox152', but its type (Vortex.Web.UI.WebControls.ComboBox) is not compatible with the type of control (Vortex.Web.UI.WebControls.ComboBox).
Source Error:
Line 404: <vortex:combobox runat="server" enableautofill="true">
Previously, these drop downs all worked fine using the standard dropdownlist control.
How do I get Visual Studio to recognize this custom control?
Thanks in advance for any insight/help,
-Matt