Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to add resources during runtime

Answer Posted / mithun

Call the GetLocalResourceObject or GetGlobalResourceObject method to read specific resources from a global or local resource file

The GetGlobalResourceObject method takes the name of a resource class and the resource ID. The class name is based on the .resx file name. For example, the file WebResources.resx, and all associated localized files, are referenced by the class name WebResources.

The GetLocalResourceObject method takes a resource name representing a ResourceKey property.

Button1.Text = GetLocalResourceObject("Button1.Text").ToString();

Button2.Text = (String)GetGlobalResourceObject(
"WebResourcesGlobal", "Button2.Text");


A local default resource file stored in the special App_LocalResources folder is named according to the ASP.NET page. For example, if the following code is used in a Default.aspx page, the resource file must be named Default.aspx.resx. For this example, add a string resource to this file named Button1.Text with the value "Found Resources".

A global default resource file that is stored in the special App_GlobalResources folder is named WebResourcesGlobal.resx. Add a string resource named LogoUrl with the value "Found Resources".

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the properties of datacontrol?

2490


What is form description?

1008


Which property of the progressbar control specifies the amount to increment the current value of the control?

1062


What is dynamic linking?

1041


How to get records from a database?

1010


Are windows forms still used?

1060


What are the forms of database?

955


What is the difference between pixels, points, and em’s when fonts are displayed?

1024


Name the event that enables the user to prevent shifting of focus from control until all the validation rules have been met.

899


Name the property which is used to lock a textbox to enter data?

1067


Name the method that has to be overridden to change the appearance of the control that is inherited from an existing control.

930


What is window form application?

918


What is the extension of the windows installer file?

1054


What is form and its types?

965


What are controls in windows forms?

980