|
Comments and Discussions
|
 |
|
 |
Great article mate! Short, sweet and too the point. There are tons of articles out there that cover this subject, but are just plain wrong! Thanks for this. This should be bookmarked for all asp.net developers who need to embed resources.
Life is a game. Play to win
|
|
|
|
 |
Thanks buddy ..
Having Experience of more than 3.5years,ASP.NET(1.1 and 2.0),c#.net,SharePoint, Webservices,XML, SQL Server 2000, VS 2005/2003, Remoting, AD, Nunit, NHibernate,Design Patterns,Ajax,Agile.
|
|
|
|
 |
I'm trying to embed a stylesheet. I believe I have the namespace set correctly but no styles are coming through. The link is added to the header and the resource is in the DLL file. I can see this by using a binary editor.
The rendered HTML includes the /WebResource.axd URL but when I copy it and put it into the browser address line I get an error - "HTTP Error 400 - Bad Request."
My CSS file is in a folder called /styles....
So I have something like this...
[assembly: System.Web.UI.WebResource("MyNamespace.styles.my.css", "text/css")]
in the page I have...
string href = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyNamespace.styles.my.css");
Anything I can look for or try?
Thanks
|
|
|
|
 |
Found the solutions to my problem...
changed this...
string href = Page.ClientScript.GetWebResourceUrl(this.GetType(), "MyNamespace.styles.my.css");
to this...
string href = Page.ClientScript.GetWebResourceUrl(typeof(MyPageClass), "MyNamespace.styles.my.css");
|
|
|
|
 |
Good...you got it
Having Experience of more than 3.5years,ASP.NET(1.1 and 2.0),c#.net,SharePoint, Webservices,XML, SQL Server 2000, VS 2005/2003, Remoting, AD, Nunit, NHibernate,Design Patterns,Ajax,Agile.
|
|
|
|
|
 |
hi,
will upload soon
Having Experience of more than 3.5years,ASP.NET(1.1 and 2.0),c#.net,SharePoint, Webservices,XML, SQL Server 2000, VS 2005/2003, Remoting, AD, Nunit, NHibernate,Design Patterns,Ajax,Agile.
|
|
|
|
 |
I am looking forward to test your code tomorrow.
I am working on a solution with code on the client side in a web part in SharePoint.
But I do not understand "Add .axd extension in ur virtual directory configuration".
Best regards, Sambuccus
|
|
|
|
 |
steps:
1. go to IIS and open virtual directory
2. right click virtul directory and open properties ,click on configuration button
3.add extension .axd with all parammeters as that for .aspx extntion..
i think ..u may hav got what i wanted to say ...
feel free to ask if u have any query....
Regards,
Bhupendra
Having Experience:3.5years+, ASP.NET(1.1 and 2.0),c#.net,SharePoint , Webservices,XML, SQL Server 2000,VS 2005/2003,Remoting, AD, Nunit, NHibernate,Design Patterns,Ajax,Agile
modified on Friday, December 14, 2007 2:25:01 AM
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
Type | Article |
Licence | CPOL |
First Posted | 30 Nov 2007 |
Views | 46,342 |
Downloads | 541 |
Bookmarked | 26 times |
|
|