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.
I want to make a textbox with a specific style, within this style a set of images as background parts, how can i attach these images to the custom control as whenever i take the .dll file and add it to the toolbar the images do not appear. So i tried to make them as resource files and their property as embedded in .resx file, so how to make the css style background image url to be linked to any of those image.
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:
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!
want to create and use resource file in my application (VB.NET 2008). Can i use .resx file or should i convert it into .resources file? please tel me the steps to create and use resource file in VB.NET with sample code.
I'm new to c# programming..I'm using windows form application c# .netI have been given a .resources file. it contains 2 columns 1) key and 2) values.I have brought the contents of this file into a datagrid using dynamic table in between and using resource manager.Now i have to edit the value column in the datagrid and if i click on a GENERATE button i should create a new resource file and it has to be stored as a file. In the same way i should create many sucj resource file.
I'm using labels with resource keys. Right now i made a control, with also a lot of resource key's in it, i thought the page where i put the control in would read the resources, but it wont. So 2 solutions needed.
The nicest thing would be if i could 'bind' the resourcefile to the ascx file. But how? Otherwise i need to get the values to the ascx file, but how can i do that?
How can i get the value of the resource file, of course het sould auto select the correct language resx file. With this it works:
I try to use internationalization in MVC but I can not make the resource strings public to my application.If I follow Steve Sanderson then I have to create a resource file and enter my strings. But in the window to enter the strings I can not choose the drop down to change the modifier because it is inactive (grey).
Below the code which should make the relation to the resourcefile en specify the error when the field is left empty.
We are migrating the VB6 applications into VB.NET (2008). They implemented the globalization in the Vb6 application by storing the english strings and corresponding langauage text (italian,spanish or french) in Database(SQL). Now we need to create a resource file in VB.NET(2008) for each language. Instead of creating resource file manually we want to write an application which will create resource file dynamically for each language and copy the english string and correspoding language text value from database into resource file.
SLNo Language English Value 1 English Name Name 2 Italian Name Nome 3 Spanish Name nombre