My problem was resolved.
Anybody can accomplish as following steps:
- Add a class library to your solution
- Add the resource files which you want to embed
- Register your resource in AssemblyInfo.cs
[assembly: System.Web.UI.WebResource("A.B.C", "D")]
with:
A is your class library name
B is the folder's name which contain your resource file
C is the resource files'name
D is the content type of your resource ("text/javascript" or another)
- In the code behind file of the asp.net page you include the resource:
string scriptLocation = Page.ClientScript.GetWebResourceUrl(typeof(the empty class' name which added before), "A.B.C");
Page.ClientScript.RegisterClientScriptInclude("A.B.C", scriptLocation);