Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

I need a control that is the same as Ajax ComboBox which I want to make a little coding
in postback and also create new javascript array accesible in ClientSide
for that User Control.

I want to build this User Control as a dll so I could be able to add it as a reference
in my project.
My Control should inherit as follows:
public class MyComboBox : AjaxControlToolKit.ComboBox

The question is: How can I make this usercontrol in VS 2010? Any ideas please.
Posted
Updated 26-Jan-11 3:16am
v2

 
Share this answer
 
Comments
Abdul Rahman Hamidy 26-Jan-11 9:31am    
thanks, I dont have issue creating user control, I want to create a control inherited from Ajax ComboBox, which should provide all functionalities of Ajax ComboBox. My question is different from what the link provides.
Ryan Zahra 26-Jan-11 10:12am    
Your user control must inherit all the methods available for the ajax ComboBox
Abdul Rahman Hamidy 26-Jan-11 11:05am    
thanks, this is what my question is? how?
You're almost there, to be honest. You can create a class library project and do as you propose with:

public class MyComboBox : AjaxControlToolKit.ComboBox


you can then reference the project in your web project and use your own derived control. if you want visual designer support you're going to have to do a bit more, do a search on design time support for ASP.net server controls for more info.
 
Share this answer
 
Comments
Abdul Rahman Hamidy 26-Jan-11 9:58am    
thanks, the bad thing is my VS 2010, VS 2008 and VS 2005 dont have Web Control Library, they have AJAX SERVER Control and ASP.Net SERVER Control. any ideas of that template?
jim lahey 26-Jan-11 11:15am    
you just need a project of type class library, with your combobox implemented as a class. make sure you've got the right .net .dlls referenced.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900