473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Webresource script not embedded? not working.

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.clie ntcode.ascx.js",
"text/javascript")]
OR
[assembly:
WebResource("name.space.code.end.pages.common.cont rols.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.GetT ype(),
"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.

Nov 6 '07 #1
2 2551
possibly it could be taking the namespace as
[name.space.code.end.pages.common.controls.Supporti ngJS.clientcode] ???
and it thinks that your file name is [ascx.js]

[assembly: System.Web.UI.WebResource("myImage.gif", "img/gif")]
[assembly: System.Web.UI.WebResource("myStylesheet.css", "text/css")]
[assembly: System.Web.UI.WebResource("myJavascript.js", "text/js")]
"zb" <ze****@gmail.comwrote in message
news:11**********************@i38g2000prf.googlegr oups.com...
>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.clie ntcode.ascx.js",
"text/javascript")]
OR
[assembly:
WebResource("name.space.code.end.pages.common.cont rols.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.GetT ype(),
"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.

Nov 7 '07 #2


WebResource("name.space.code.end.SupportingJS.clie ntcode.ascx.js",

"zb" <ze****@gmail.comwrote in message
news:11**********************@i38g2000prf.googlegr oups.com...
>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.clie ntcode.ascx.js",
"text/javascript")]
OR
[assembly:
WebResource("name.space.code.end.pages.common.cont rols.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.GetT ype(),
"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.

Nov 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: jojobar | last post by:
Okay, I am trying to do is to test the webresource in 2.0 1. I created a new project with assembly name (and default assembly name) "Office". 2. I added the following to the AssemblyInfo.cs...
0
by: Groove | last post by:
(repost!) I have a simple and common scenario. I'm developing pages in VWD and FTP-ing them over to a test servr running Window 2003, NET2 Framework. On my page, I have a DDL that causes a...
0
by: sunev | last post by:
I have a question regarding WebResource and in particular the PerformSubstitution. I see that the <%=WebResouce(…)%can be used with a WebResource to perform substitution on a resource to...
4
by: Alan Silver | last post by:
Hello, I have an error logging system on one of my sites, so that if an unexpected exception occurs, I get an e-mail sent. The e-mail includes the name of the page on which the exception...
8
by: Mark Rae | last post by:
Hi, I'm developing an intranet for a client. On my development machine, I have created a virtual directory called, fairly unimaginatively, intranet. However, the client wants to deploy the app...
1
by: =?Utf-8?B?TWF5?= | last post by:
We are getting WebForm_DoPostBackWithOptions is not defined and other Java script errors related to WebResource.axd file. I narrowed down the problem and found out the cause but can't come up with...
3
by: Ryan H | last post by:
Hi, I was wondering what causes the querystring for the following to change: <script src="http://www.smci.com/WebResource.axd?d=SfpsT7lZdzkry6EvmJfBcQ2&amp;t=633197198783984965"...
0
by: zb | last post by:
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...
2
by: Roberto Rasto | last post by:
I have an application that use Componentart WebUI calendar control. When I execute on local everything works fine. When I execute on server I get the javascript error: Expected ')' I compared the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.