Click here to Skip to main content
15,887,821 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

I'm using visual studio 2019 and I want to start with creating web controls for easy use.
I started a new Library application but visual studio 2019 is quit new to me.

I currently have this

public class Menu : Control
{

}


Usually I added the reference so I can use the "Control" class but that doesn't work anymore. I looked in nuget packages but don't know which one to install.
I looked all over the net but not that much info about vs2019.

So I'm trying my luck here.

What I have tried:

I tried to look on the net and in nugget packages but don't know which one to install.
Posted
Updated 17-Oct-20 13:55pm

It seems you are looking for steps around creating a custom control.

Given you have tagged as web, following should help you started:
Developing ASP.NET Server Controls | Microsoft Docs[^]

Given you shared you are new, this would help you understand about user/custom control difference: Overview of user controls vs. custom controls[^]
 
Share this answer
 
Comments
Davy Quyo 17-Oct-20 19:04pm    
Thank you for the response.
I try to build my own Script Controls from scratch. It gives me some kind of freedom. thats why I actually try to find the "Control" class.

ServerControls etc are all in the namespace System.Web.UI
But somehow I can't find that namespace either. thats why I call out for help.
Sandeep Mewara 17-Oct-20 19:06pm    
Sounds like you are looking for Winforms Controls and not web.

See here:
https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/?view=netframeworkdesktop-4.8
https://docs.microsoft.com/en-us/dotnet/desktop/winforms/controls/developing-custom-windows-forms-controls?view=netframeworkdesktop-4.8
Davy Quyo 17-Oct-20 19:12pm    
no, its for web
It used to be under

"System.Web.UI.Control"

But can't find it anywhere in my library application I try to build for web.
I been looking for it all day but finally found it.
I needed to open a Class Library (.NET Framework).
Else I couldn't find it.
 
Share this answer
 
Comments
BillWoodruff 18-Oct-20 10:37am    
A Class Library is not a WebControl.
Davy Quyo 28-Oct-20 16:50pm    
it had the correct references to add the webcontrols. I couldn't find or add the references I need with other library applications.

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