Which ASP.NET control to choose

81 Views Asked by At

I am making a web app in which I would like to create my own control. According to [tutorialspoint] there are 5 different types of ASP.NET web controls and I can't decide which to choose.

The control will be responsible for displaying an image downloaded from server and then injecting a js script to client browser. The script will display something on the image. The main problem is that I want to make this control totally standalone and encapsulate the script file in it (in MyProject).

screenshot

As for now, my control inherits from System.Web.UI.WebControls.Image and injecting my script (from control, programmatically, using ScirptManager) demands adding the js file to my WebFormsApp project (but I dont't want to).

The question is - is it possible to encapsulate the js file in my control project? Should I change the type of control I'm currently using?

0

There are 0 best solutions below