I wonder what is the best place to store the enums I should use like constants in my n-tiers Application.
So I have an application with a DAL(connect to database), a BLL(Business processes), a Data Transfert object "Layer" (classes without any methods but just fields, this one is reacheable by all the others) and the interface layer with the asp pages.
My question is : I have a enum:
[code]....
Where can I put this enum(and all the others) to be clean? Not in the Data Access Layer the Interface layer will not see the struct, not in the Business Logic Layer, this is not really business.. Maybe in the Data Transfert Object but is it really a "Transfert object"?
Is such an architecture possible? What datatypes can we use? I only exemplified enums because this is what i use right now, but they must be declared in the same file as they are used.
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 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 need to create both local and global resource file in VB.NET. And also i need to use both resource file in a single page. how to create and use in VB.NET (VS2008).
I need to be able to change the resource file used by an ASP.Net Page based on some value other than Culture/Language/Region. The purpopse is to simply configure properties on the page based on a city or site name or other criteria. I do not want to change language or culture/region.
Is it better to store images directly in a database or to just store the name of the file in the db and display that file? I would think that just storing the filename of the image would keep the db size low...
I have a project at work 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.
I would like to hook up custom error page to my ASP.NET web site.What I would like to do is that. When any error occured transfer the visitor to a custom error page informing about the error,
and at the same time log into a file or send an e-mail to my email account reporting the error.Then an other thing how can I generate error for testing the my Eventhandler method?
I am doing an AJAX call back to a WebMethod but in the code behind webmethod I cannot use any of the constants at the to of my form. What I want is to gain access to sessions and my sql connection string.
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 have a database table that contains list of all UserTypes(constant strings) used in the application.
What is the best way to store(what datastructure do I need) these so that code can access them ?
The need is similar to enum, but I want to associate these values to those in DB so that there will not be 2 places to edit in case of adding/removing an entry.
one other option I considered is using public static readonly string, but how to associate with those values in DB ?
my asp.net site uses resource files for a referenced project with the user controls in it.
so i have one website project, and one dll project with usercontrols + the resource files.
The website references the dll project.
So far so good.
When i publish, the dll with the usercontrols gets compiled in a dll (what else) but the resource files also get compiled (a separate dll for every language)
Is there a way to edit the resource strings in the dll once deployed?
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).
I am a bit confused about these two sequence of events or processes happening in conjunction to each other. Does the page handler executes first or does the somepage.aspx get execute first or do they happen simultaneously?
I'm working on a CMS system which uses a resource file to get information and errormessages from. The client side validation is working without problems, only it's not getting the errormessage from the resource file. While debugging i figured out xval seems to get the errormessages from a javascript file where the messages are set hard-coded. Is there some way to override this?
Below the code which should make the relation to the resourcefile en specify the error when the field is left empty.