I want build a MVC Custom Control.
Now I have a problem.
My control has a file of js and a file of css.
I only want the page which used the control load the js and the css
and if i use this control maney times the js and css load once.
I know we can do like this in web form: ClientScript.RegisterClientScriptResource(typeof(..), "Assembly.MyScript.js");
but how can i do this in mvc??
there are two problem:
1.I want build a control to use in my project just like this @html.mycontrol() and the person who use it do not care any other(do not care if js or css load)
2.this control may use in other project.so i do not want the the other project know how to get the controls js or css(i Write this control in class liberary)