Last post Feb 04, 2010 02:35 AM by Song-Tian - MSFT
Feb 01, 2010 06:09 AM|akhilrajau|LINK
I am in a web application project with localisation support. I am using seperate web application project for maintain resource file and add the reference to the main application. My application
structure is follow:
1. I have main project and added project reference to the reosurce web application project.
2. In Resource project i added default and one more language resource file in the application directory itself.
3. In main project i used CodeExpressionBuilder Class to access the resources from that project..
All working perfectly. But my new requirement is follows:
1. I want to create a Web application project to read and change the resouce file. So all lngaugaes i can see readbly using this tool.
I implemented thesae and working nicely. But my problem is..
Cannot get new value if i didnt access the resouce file explicitely.
I added new values to the resouce file thorugh the tool i created. When i run the main project..showing the error " cannot file the value". But if i open th resource file and save and run working
nicely... Can you help about this?
I refresh the project and update the reference but not working if not access the resource file...This is happedned only add new keys.. not modifyied exsting one..
I found th problem Actually class file not compiled. When i acess through code i can get the new value but cant get design time. can u give idea in design time mode..
code i used to get the value..
ResourceSet st = ResourceApp.Resource1.ResourceManager.GetResourceSet(System.Threading.Thread.CurrentThread.CurrentCulture, true, true);
lbl.Text = st.GetString("key");
Feb 01, 2010 11:27 AM|thuhue|LINK
What is your current problem now?
What do you want to accomplish now?
Feb 01, 2010 11:07 PM|akhilrajau|LINK
actually i added new keys to the resx file through code. Keys added to the resx file also. But when i run my application error showing as "that key is not found in the Resource class"
Actually i got what the actual problem is. Class not updated only the file is updated i think so. Because when i check the resx file i got the new keys but when i access the key though code not getting..
eg: <asp:Label id="lbl" runat="Server" Text = "<%$Code:ResourceApp.Resource1.lblName%>"/>
or code behind.
lbl.Text = ResourceApp.Resource1.lblName .
That lblName not getting..
but ig i access thorugh REsourceSet i got the new value. I want to update the values immediately after added new values though my code
Feb 04, 2010 02:35 AM|Song-Tian - MSFT|LINK
Please check this:http://msdn.microsoft.com/en-us/library/ms228208.aspx .