How to use resource sing in MVC 4 application.
Step 1 : First create your MVC 4 Web application using Visual Studio 2010 | 2012
Step 2 : Right click on project node and Select Add --> New Item --> select "Resource File"
and give file name and click on "Add Button".
Step 3 : Resource file will added to your project open that file and create labels
Like Name = "lblProjectTitle" value ="Demo"
Step 4 : To access resource file in your project please select access modifier as "Public"
Step 5 : Add resource parameter on your web page this way.
@ResourceName.lblProjectTitle
Step 6 : This way you can create your resource file and access in MVC.
No comments:
Post a Comment
Thank you for your interest .