Z
zb
I have my code directory structured this way
App
App\Pages <- contains ASPX files
App\Pages\Common
App\Pages\Common\Controls <- has user controls
App\Pages\Common\Controls\SupportingJS <- has .js script files located
here
THe .js file is marked as embedded resource in VS.
Rootname space of the application is: name.space.code.end
How would I embed this as a resource in the build?
I have referred other publishes on the internet but to no help. The
directory structure is very straight forward.
In assembly.cs file this is what I added:
[assembly:
WebResource("name.space.code.end.SupportingJS.clientcode.ascx.js",
"text/javascript")]
OR
[assembly:
WebResource("name.space.code.end.pages.common.controls.SupportingJS.clientcode.ascx.js",
"text/javascript")]
Neither seem to help.
In user control, i have this code:
this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(),
"name.space.code.end.SupportingJS.clientcode",
this.Page.ClientScript.GetWebResourceUrl(this.GetType(),
"name.space.code.end.SupportingJS.clientcode.ascx.js"));
And similar combination for the other webresource registration as
shown above.
All combinations have failed? An example will be very helpful.
I read on the Internet the format of this should be: [Assembly of this
project].[Folder containing resource].[Filename of resource]. But, the
examples I see are simple 1 or 2 deep directory structures. How would
this apply in my case (as shown above)?
Thanks.
App
App\Pages <- contains ASPX files
App\Pages\Common
App\Pages\Common\Controls <- has user controls
App\Pages\Common\Controls\SupportingJS <- has .js script files located
here
THe .js file is marked as embedded resource in VS.
Rootname space of the application is: name.space.code.end
How would I embed this as a resource in the build?
I have referred other publishes on the internet but to no help. The
directory structure is very straight forward.
In assembly.cs file this is what I added:
[assembly:
WebResource("name.space.code.end.SupportingJS.clientcode.ascx.js",
"text/javascript")]
OR
[assembly:
WebResource("name.space.code.end.pages.common.controls.SupportingJS.clientcode.ascx.js",
"text/javascript")]
Neither seem to help.
In user control, i have this code:
this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(),
"name.space.code.end.SupportingJS.clientcode",
this.Page.ClientScript.GetWebResourceUrl(this.GetType(),
"name.space.code.end.SupportingJS.clientcode.ascx.js"));
And similar combination for the other webresource registration as
shown above.
All combinations have failed? An example will be very helpful.
I read on the Internet the format of this should be: [Assembly of this
project].[Folder containing resource].[Filename of resource]. But, the
examples I see are simple 1 or 2 deep directory structures. How would
this apply in my case (as shown above)?
Thanks.