views:

51

answers:

0

My situation is this:

I have created a utility class on my solution that uses a method that uses jquery registered code to setfocus on a control.

The problem:

Using WebResources in a class thats is not a control simply dont work, i endup getting a empty script source references... something like this(script src="/WebSite/WebResource.axd?d=FRIcuShUv_H285QWd1XURg2&t=633834088103732959" type="text/javascript">) that points to no where.

Funny enough if my class library project is a webcontrol, a class that inherits of textbox or any other webcontrol and then use it as a control in my page it works.

Question: Is webresources assembly reference only suposed to work in a webcontrol context? How i add a resource like jquery by demand of a method that uses jquery functions registered by something like this method "RegisterStartupScript".

This page has a example of the webreference being used in a control context, just to be clear thats im aware of that method. http://bchavez.bitarmory.com/archive/2008/07/28/understanding-scriptresource-and-webresource-in-asp.net.aspx