Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 12-01-2011
Member
 
Join Date: Jan 2011
Posts: 46
How to add Local resource in Asp.net

I am third year computer science student. According to our syllabus this year we have to do develop one web site with front end language as asp.net. But I stuck around one issue that is how to give different different user interfaces not actually whole interface just that appeaser along with each control. Without relying on end user bowers settings which are actually related to their highest priority language preferred in their browsers settings. Is there any concept in .Net which helps me to solve this issue?
Reply With Quote
  #2  
Old 12-01-2011
Member
 
Join Date: Apr 2009
Posts: 567
Re: How to add Local resource in Asp.net

I don?t how this issue stops your process of development. .Net is one of the finest products of Microsoft which provides you so many ways to do same thing in variety of ways. If site developing by you is not bigger that is just around 5 to ten pages than I suggest you to achieve this, use simple conditional statements like if, Switch etc. Just provide one drop down list box or link button for selecting language that end user wants to use while interacting with your web site. And on the click event of link button or selected index change event of these two controls write code to change browsers highest priority language with that one which you give on click of Link button.
Reply With Quote
  #3  
Old 12-01-2011
Member
 
Join Date: May 2009
Posts: 620
Re: How to add Local resource in Asp.net

If you are unable to change the language appeared on GUI at runtime, by using different events provided by control than I have a simple solution for you and that is use the concept of local resources available in asp.net. Local resources are those resources which available only to that page that you mentioned as default one. For creating local resources you just have to create one file called local resources inside "App_Localresources" folder available in solution explorer. For doing that simply go crate local resource option available under tools option. Notice that before creating local resource file you have to complete your GUI first. After creating that file open it, it will display all the controls placed on that page with value column. In that column you can write in language that you want to display along with that particular control. For different differ language use different files by simply making copy of it. And to use them on your current page you just have to write one line of code that is create one object of thread and passing the culture variable. To do that on the click Or any event according to control you providing to user store its value to ?__Event control?. To storing value you can follow the concept of arrays.
Reply With Quote
  #4  
Old 12-01-2011
Member
 
Join Date: May 2009
Posts: 523
Re: How to add Local resource in Asp.net

If your web site is too big so that you are unable to add local resource file each and every page than I suggest you to go for another option related to variables which are easily accessible to each and every page of your web site. You can easily come to know that which concept should use to achieve this ting buy referring the asp. Nets refers guide. WHICH IS EASILY AVAILABLE ON OFFICIAL SITE OF .NET.And you easily able to apply them inside your project.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to add Local resource in Asp.net"
Thread Thread Starter Forum Replies Last Post
How to calculate cost based on resource rate? I have more than 5 rates per resource boxta Microsoft Project 8 08-05-2012 12:46 PM
Not allowed to load local resource Error message occurring on HP WebOS Faiyaz9 Portable Devices 5 23-08-2011 10:20 PM
Cluster error 1230: Cluster resource '%1' (resource type '%2', DLL '%3') either crashed or deadlocked. The EClipse Operating Systems 4 21-08-2010 04:03 AM
The Best Resource Hacker fabien Networking & Security 3 03-06-2009 12:04 PM
Local Area Connection > Local Only Ashish Goenkar Windows Vista Network 3 29-01-2008 12:19 AM


All times are GMT +5.5. The time now is 11:35 AM.