I have an assembly called like X.Common.DLL. There is some resources files for multilanguage app. Let's say it Language.resx Language.en-US.resx....etc.... I have a web application which contains this above dll as reference... So how can I use this resources file in my web applications markup side?
Text="<%$ Resources:Class, ResourceKey %>" is not valid because of "Class" name is in another assembly...
what it should output is my enable image with the text on the right saying 'enable' if i only have Text='<img src="app_images/enable.png" />' i have the image, just a question of how to add the resource entry at the end of it...
As the title says then the question is relative simple however I cant decide whether a resource file with strings in is better than hard-coded strings...
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
I have a class library and was to add a resource file to it to support both English and Spanish. Any tips as how I can do this? The language will be dictated by the user visiting the site. Would like to have to only load each resource file once and cache or set in static variable and avoid any overheads.
In my master page I tried to do the following: <asp:HyperLink ID="asdf" runat="server" NavigateUrl='<%= GetRouteUrl("about-route", new {}) %>'>Test</asdf> I got a compiler error: Server tags cannot contain <% ... %> constructs. What is the proper way to create a route URL in a server control in Web Forms? I also need to include it in the following:
This type of thing. when I first came across it I loved it, i'm using it again today but not quite so simply. I have a number of extra things I would like to achieve.
Apply formatting to the value. Like Text='<%# string.Format(XPath("FACEVALUE"), "{0:c}") %>'> <asp:LinkButton ID="lnkBook" runat="server" PostBackUrl='/THEATRE/' + XPath("FACEVALUE")>Book</asp:LinkButton>
For option number 2 the URL is not as I would expect, and for number 1 I cannot get the syntax correct if it's even possible.
I have not been able to find something suitable in google. Hopefully what I am trying to achieve is obvious from the example :)
Ive got problem with intellisense in markup for example:
When I type
<dxwgv:ASPxGridView ID="grid" runat="server"> <Columns> < -- here I hit ctrl + space and only normla html tags are shown: a, abbr ... -- But I would like to have available columns instead :/ </Columns> </ dxwgv:ASPxGridView>
I have a DropDownList in a template column of a GridView control. The GridView is bound to a list of objects. Each object has a property of type int which corresponds to a value in one of the DropDownLists ListItems. I could set the selected item programatically by adding a DataBind event to the drop down, but I'm wondering if there's a way to set the selected item by using a code block in the aspx markup.
Is it possible to do things in a PHPish way in ASP.Net? I've seen <%= %> but I've tried it and couldn't get it to work. The PHPish equivalent of what I want to do is
I have a field in my SQL database that contains HTML markup from the HTMLEditor control in the AjaxControlToolkit. When I use the Report Viewer and SQL Reporting Services to display this field in a report, the field is displayed using the tags. I would either like to hide the tags completely or render them so that they format the text appropriately, rather than the tags be displayed as a load of <p>, <br>, <strong> tags etc. I've searched around and tried out a few different articles but haven't yet had any success.
I've been assigned changes to make to an ASP.NET project. The WebForm I'm working on needs to dynamically display and hide controls in response to user actions.
So far, so good. My approach would be to create a little JavaScript. However, on this page, the markup is part of a template for a Telerik control (which I know nothing about). I'm not sure the ramifications of this. Can I still use JavaScript for templated markup?
I tried to insert some existing JavaScript in the page. The first problem I have is my use of <%= ControlName.ClientID %>, which produces an error because the name of the control in the template is not seen to exist by ASP.NET.
Is there another way to do this, or am I just going to run into more problems?
private ListDictionary parameters; public ListDictionary Parameters { get { if (parameters == null) parameters = new ListDictionary(); return parameters; } set { if (parameters == null) parameters = new ListDictionary(); parameters = value; } }
can i set such property in the markup of ASP.NET page? and how?
i mean something like <uc1:CustomControl Parameters="?"
i've to display a messagge in my homepage (default.aspx) different for each "installation" of my web app. i would like to avoid to make a call to database to show this message.. so i've thougth to use web.config to store something like this
<add key="WelcomeString" value="lorem ipsus <b>doloret sit amen</b>" />
But i've noticed i can't use html markup into web.config Is there a better approach ? Or is there a way to insert html markup into web.config ?
I have a few applications that need to share a common set of markup.
Scenario: I might have www.site1.com, www.site2.com, and www.site3.com. On all sites, /care/contact-us.aspx and /care/faqs.aspx will be exactly the same, but every other page will be totally different.
Issue: I'm attempting to not duplicate the .aspx files for each of these sites and would like to have a /care virtual directory that would include contact-us.aspx and faqs.aspx that each of these sites would use. I have seen this post from Scott Gu, but I'm looking for any other solutions/ideas.
Question 1: What would be the best way to set this up to share the /care directory?
Question 2: Any about also sharing the code behind.
Background, if you care: In a legacy application (asp classic/vbscript), we have the ability to use a /common virtual directory for sites to share common markup and code (since they're all mixed together in .asp files).
I have a userControl that contains a radioButtonList, a label control (used for captions) and a bunch of validation controls. I have included all the public properties that allow me to dynamically add list items (ie from the DB) but I'm wondering if there is a way to allow the user to add listItems via the markup like you would when using a regular <asp:RadioButtonList control?