Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is WebResource.axd?

I have troubles with blowery web and WebResource.axd.

What is WebResource.axd?

like image 532
wally Avatar asked Jul 23 '10 12:07

wally


People also ask

How do I find my WebResource Axd?

webresource. axd is only present if the page uses asp.net resources such as validation, ajax etc. Other refereces: http://bytes.com/topic/asp-net/answers/560230-path-webresource-axd.

How do I open an .AXD file?

If you cannot open your AXD file correctly, try to right-click or long-press the file. Then click "Open with" and choose an application. You can also display a AXD file directly in the browser: Just drag the file onto this browser window and drop it.


1 Answers

WebResource.axd provides access to embedded resources within a project. It's a handler that enables control and page developers to download resources that are embedded in an assembly to the end user.

You include WebResources in your AssemblyInfo:

[assembly: System.Web.UI.WebResource("Project.Styles.Main.css", "text/css")] 

Then you can get an include path for your Page using the following code:

string includeLocation = Page.ClientScript.GetWebResourceUrl(this.GetType(),         "Project.Styles.Main.css"); 

Then to add the above file (which is a CSS file in this case):

LiteralControl include = new LiteralControl(     String.Format(includeTemplate, includeLocation));  ((System.Web.UI.HtmlControls.HtmlHead)Page.Header).Controls.Add(include); 

Then you'll end up seeing references within your page source such as the following:

/WebResource.axd?d=PhPk80h_UWEcbheb-NHNP5WshV_47UOpWqAOl1_li     UFfN4cNofL74cFlQ1fvpFSf0&t=632573240669964903 
like image 189
djdd87 Avatar answered Sep 28 '22 00:09

djdd87