0

I'm not quite familiar with asp.net ajax, so my question might be a silly one.

I'm working on the asp.net ajax control library for self-educational purposes and it is not quite clear to me how to add script/web resources to my class library project.

I've added the following lines to the AssenblyInfo.cs

[assembly: WebResource("BlackGoat.UI.Controls.TooltipControl.Tooltip.js","text/javascript")]
[assembly: ScriptResource("BlackGoat.UI.Controls.TooltipControl.Tooltip.js","BlackGoat.UI.Tooltip", "BlackGoat.UI.Resource")]

The relative path to the javascript file is Controls\TooltipControl\Tooltip.js, however the directories Controls and TooltipControl are not namespace providers so I'm not sure how should I specify the the js file 'namespace' in the AssemblyInfo.cs

Any clarification would be appreciated. Thanks in advance.

1 Answer 1

1

Embedded resources do use folder names as namespaces, so if your default namespace is BlackGoat.UI, and folder is Controls\TooltipControl, it would be namespaced as BlackGoat.UI.Controls.TooltipControl... that's how the framework does it internally.

Check this out: http://www.codeproject.com/KB/dotnet/embeddedresources.aspx

To reference it in your AJAX control, setup the ScriptReference to use the full name as the type, and the name of the assembly (rather than using the path option).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.