Configuration :: Hiding And Protecting Static XML Files - Embedded Resource?

Nov 3, 2010

Does precompilation have any effect on XML files? i.e. can I obscure/protect xml files using precompilation? I assume that it has no effect as they aren't code.

If I use XML files as Embedded Resources, they appear in the DLL in a text editor as normal text. If the dll is edited and saved using a text editor, will it still work if it is unsigned?

View 2 Replies


Similar Messages:

Configuration :: URL Rewriting Static Files Like CSS?

Nov 2, 2010

How do I rewrite the url for static files? When adding something like

RouteTable.Routes.MapPageRoute("test", "style/style.css", "~/Static/Styles/Public.css");

I just want the url /style/style.css to point to another static file on the webserver..

I'm getting this error:

There is no build provider registered for the extension '.css'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'.

View 5 Replies

C# - Load Template From Embedded Resource?

Oct 15, 2010

How can I load an embedded resource as an ITemplate? The LoadTemplate() method only takes a string virtual path, and obviously this will not work for embedded resources.

View 2 Replies

Web Forms :: Skin File As An Embedded Resource?

May 11, 2010

Question: Is it possible to embed .skin files as a resource?

I am creating a library of user controls(grids, buttons, etc.) that are common among all of our web projects. I have included several common javascript files used by the controls by adding them as an embedded resource and registering them as a resource using RegisterClientScriptResource. Everything works great.

However, the last thing I would like to do is embed skin files in this project so that all the controls have the same look. I know I can control look solely with css, but I would like to control some of the other asp attributes as well(ie AllowSorting and AllowPaging attributes of a grid). Is it possible to embed skin files as a resource? Or will each individial project need a copy of the skin file? If anyone could provide insight on how I can go about embedding a skin file..

View 1 Replies

C# - Loading Crystal Report From Embedded Resource

Mar 29, 2011

I have an ASP.NET website and a referenced class library project. In this class library I have a Crystal Report set as embedded resource. I want to load the report dynamically into a CrystalReportViewer.

View 1 Replies

Proper Syntax For Embedded Resource Tags?

Aug 26, 2010

I'm trying to localize an asp.net web application. Consider the following asp.net code. I'm running with CurrentCulture and CurrentUICulture set to German ("DE-DE").

<%= ReportTitles.EndOfDay %>
<asp:Literal ID="litLabel" runat="server" Text="<%$ Resources:ReportTitles, EndOfDay %>"/>

I expect these two lines to yield the same result, but instead I get this:

Auswertungen für den Tagesabschluss
End of Day

In other words, the first syntax <%= ReportTitles.EndOfDay %>successfully retrieves the value from the ReportTitles.de.resx file we're using, but the second syntax <asp:Literal ID="litLabel" runat="server" Text="<%$ Resources:ReportTitles, EndOfDay %>"/>
gets the value out of the default US English ReportTitles.resx file.

View 1 Replies

How To Localize A Non Embedded Javascript File With Resource

Sep 3, 2010

I have a question about javascript. In my project, there are embedded and non-embedded javascript codes. And i did localization of the embedded codes like below and it works.

CN.DEFAULT_CONFIG = {
strings : {
year: '<%=GetGlobalResourceObject("Resource", "YEAR") %>'

But, this method does not work for non-embedded javascript codes. How can i do localization for them?

View 1 Replies

File To Be An Embedded Resource Under The Build Action?

Mar 18, 2010

I have built a custom control that includes a .js file that needs to be referenced. I set the file to be an Embedded Resource under the Build Action. I then referenced it in the class like this:

[Code]....

View 2 Replies

Localization :: How To Set One Default Resource File From Many Different Resource Files

Apr 7, 2010

In our web application we need to keep various company's settings. For eg "DiamondProdRefIDCaption","Shippingpickup","ZipCodeCaption","DefaultCountry","AllowToEditInvoice", etcThese settings are different for various companies and are placed in web.config as key-value pair.Initially, we have tried do simplify this process by adding a company_settings table in the DB so as to allow us to add companies on the fly. However, this method makes it very difficult to add a new setting

<%$Resources:DiamondProdRefIDCaption%>

View 3 Replies

Visual Studio :: Adding A JS File As An Embedded Resource

Jul 4, 2010

My objective is to include a JavaScript file in my Custom Server Control, because it's a bit tedious writing all the JS in C#. I've done a lot of searching and most resources seem to say that I need to add the file as an embedded resource, and access that. I found a few pages describing how to do this:

[URL]

They all seem to say I need to, after adding the JS file, change the build action to 'embedded resource' through its properties. However, the only properties I can actually see on the file are 'File Name' and 'File Path'. Right clicking the file in the solution explorer doesn't allow me access to properties, and right clicking (as one of those links suggests) anywhere else doesn't expose it either. I tried looking through VS Options but couldn't find anything, although I get the impression that I have something configured wrong that's not allowing me to see as many properties as I should be able to.

View 2 Replies

C# - Programmatically Modifying An Embedded Resource Before Registering / Referencing It On The Page

Mar 5, 2010

Firstly, "Modifying" may be the wrong term, I see a few people have posted online just asking whether they can actually modify an embedded resource. What I am wanting to to, is use a resource in my assembly as a kind of template which I would do a find and replace on before registering it on the page - is this possible?

For example; say I have a few lines of jQuery as an embedded resource in my assembly and in this script I am referencing a CSS class name that can be set by the front-end programmer. Since I do not know what the CSS class will be until implementation, is there a way of going through the embedded resource and replacing, say, $myclass$ with ThisClassName.

View 2 Replies

Custom Server Controls :: Accessing Embedded Resource From IScriptControl?

Dec 1, 2010

My Composite control implements IScriptControl interface.

ScriptReferences java script file does the client-side work, there I want to load a html file inside iFrame.

The Html file is an embedded resource:

([assembly: System.Web.UI.WebResource("Control.Resources.list.htm", "text/html")])

I pass the path of the html to the javascript file via descriptor property:

IEnumerable<ScriptDescriptor> IScriptControl.GetScriptDescriptors()
{
descriptor.AddProperty("iframe", iframe);
return new ScriptDescriptor[] { descriptor };
}

Where iframe is a string that contains the path from the webresource.

Now, in this html file I want to display few images that must be also loaded from resource.

The Question is how to access the resources from this html file?

Do I have to pass every image path as descriptor property?

View 10 Replies

Configuration :: Protecting .ascx File In Visual Web Developer 2010 Express?

Sep 14, 2010

I am working on an application that has several user controls (.ascx) of which I do not want to give away the code of. I have tried to search about it, but didn't get very far. I am using visual web developer 2010 express edition, so I cannot publish my website. Also, it doesn't have dotfuscator. What can I do?

View 11 Replies

Embed A Static Image Resource In A Web Server Control?

Feb 15, 2010

I am going to create a web server control representing a treeview. So I want to use 2 images for + and - for expand/collapse. How can I build this into the control in a way that can be used as image source when rendered on the page?

Since this will be in a compiled web controls library, I don't want to rely on external images in the web application.

Edit: Based on this answer by Andre Kraemer I did the following:

In AssemblyInfo.vb:

<Assembly: System.Web.UI.WebResource("MyCompany.MyWebControls.Resources.plus.gif", "image/gif")>
<Assembly: System.Web.UI.WebResource("MyCompany.MyWebControls.Resources.minus.gif", "image/gif")>

In my RenderContents override:

Dim lPlusImage As New WebControls.Image()
Dim lMinusImage As New WebControls.Image()
lPlusImage.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "MyCompany.MyWebControls.Resources.plus.gif")
lMinusImage.ImageUrl = Page.ClientScript.GetWebResourceUrl(Me.GetType(), "MyCompany.MyWebControls.Resources.minus.gif")
lPlusImage.RenderControl(output)
lMinusImage.RenderControl(output)

My Assembly name is MyWebControls.

My Root Namespace is MyCompany.MyWebControls.

The images plus.gif and minus.gif are located in a folder named Resources, and the images have Build Action set to Embedded Resource.

It still does not work. I get no errors. I have tried the generated image url directly in the browser, bot nothing happens, just a blank page.

Note: I tried to use an invalid path in the resource name, and the result was exactly the same, which made me wonder if I need to do something special to map the actual resource to the resource name. I got a 404 Not Found error only if I used different name in the code than what was specified in AssemblyInfo, it had nothing to do with path was pointing to an actual resource!

View 3 Replies

The Resource Type 'XXXX.XXX' Does Not Have A Publicly Visible Static Property Named '_RequiredXXXX'?

Jan 31, 2011

"'ErrorMessageResourceType' property specified was not found."

{"The resource type 'XXXX.XXXXXX' does not have a publicly visible static property named '_RequiredXXXX'."}

I'm getting this error when my Create.aspx view is called and steps over that line:

<%=Html.TextBoxFor(Function(model) model.NO_DEMND, New With {.class = "txtbox", .disabled = True})%>
<%=Html.ValidationMessageFor(Function(model) model.NO_DEMND)%>

The message is there in the Ressources file, I think the problem is deeper than that but i'm having a hard time finding it. It pops this error very early on the ASPX page. It's the first model component it goes thru, i tried removing this one and it's the same message for all the model.xxxx components. I guess it's an error somewhere in the linkage. The .EDMX is correct and I get no build errors,

View 1 Replies

Embedded Swf Files Is Slow To Load Although The Size Of The File Is 1.60 Mb?

Feb 1, 2010

I have a .swf file embedded in my asp.net webpage. It is slow to load although the size of the file is 1.60 mb. What might be the reason for the slowness? Is there a way I can speed it up in asp.net?

View 1 Replies

Configuration :: Hiding Page Name From Url?

Nov 3, 2010

Post edited: took out the email address. If you ask questions on the forums then expect answers on the forums.

Give me source code for Hiding Page name from url in asp.net with c#

View 1 Replies

Sharing Resource Files Between Web Applications?

Jan 26, 2010

I have multiple projects that need to share resource files (.resx) Suggestions have been made to move resource files to a separate assembly and have web projects reference it. Is there an example of how to do this?

Do I create a new Class Library project and move App_GlobalResource folder inside of that? I don't think that will work because code classes that are generated for resource files are marked as 'internal' which means that they can not be accessed outside of this assembly.

View 1 Replies

C# - Use Various Culture Specific Resource Files?

Oct 19, 2010

I have a website which currently uses EN-US and I also have resource file for french. what code should I need to write to make the application use the french version of the resource file.

The site is a commerce server and share point site that uses .NET

View 4 Replies

Localization :: Translation Of Resource Files?

Feb 16, 2010

I have a multilanguage application and I use resource files (.resx). I hired a person to make the translation. My question is, am I supposed to give him the resource files in order to make the translation and how he will open the resource files? Obviously, he doesn't have a copy of Visual Studio! Is there any tool that I can give him in order to work with the resource files?

View 2 Replies

C# - Update Resource Files In Assemblie?

Jan 13, 2011

the website i'm working on has resource files for a number of languages.The resources of the website are compiled in the website dll (i think?) and the resources from other, from the website, referenced dll's, are stored in subfolders of the in directory.So i have in the bin my website.dll, and a subfolder called es with the Spanish resources for the website.services project (called website.services.resources.dll) and so on.Now we have the site live, and there is a wish for a immediate change of one of the items in a resource file.As my .resx files are compiled, i have to change the resource in the dll.

View 2 Replies

Localization :: Editing Resource Files At Runtime?

Jan 9, 2011

I need my site to be multilingual. So i have added resx to each page. Now the texts been taken from resource depends on chosen culture. Now my customer want to edit some translation from administration panel. Can resources can be edited in runtime? If they are - is it the best choise to do it that way?(Its seems to me strange i didnt see something lake that in any place)?

View 2 Replies

Storing Resource Files In Different Projects In Same Solution?

Jan 14, 2011

I have a project where I need different versions of the same site.

I need to accomplish this by having different versions of the same resource files.

I would like to store the different versions of the same resource files in seperate projects in the same solution. Then choose which project of resource files to use when I publish or compile.

I've been searching the net everywhere and my deadline is coming up.

View 1 Replies

Localization :: Load Resource Files Dynamically?

Nov 11, 2010

I am working on a application which supports multiple languages and I am doing it using asp.net resources files. Now the problem is, its a product and each user wants to have their own translations.For Example there is a text say "Home"Some users want to say it "Home Page" and some wants to say "Main Page"

Is there any possibility to do create different resource files, for each users, for each page and then load them according to the user currently logged in?

View 1 Replies

Performance Difference Of Code In Aspx And Cs Files For Showing And Hiding Control Dynamically

Feb 18, 2011

I was thinking about the performance when I use code to hide some control in aspx page using delimiters or in cs file. For e.g. If I have a panel and I want it to get shown following some condition, so I can achieve this by two ways

1: Using code in aspx file, something like this

<% if(isAllowed) { %>
<asp:Panel ...></asp:Panel>
<% } %>

2: In the code file, something like this

<asp:Panel ID="pnlMyPanel" Visible="false"></asp:Panel>

And in cs file

if(isAllowed)
pnlMyPanel.Visible=true;

In my view, first way should be good as it will not at all create any Panel in the page. Am I correct here?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved