Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

asp.net read from other local resource

I have local resources files like on screenshot:

enter image description here

How can I read local resource data of AddCustomer page in Default.aspx page?

Thanks!

like image 579
ihorko Avatar asked Feb 25 '23 23:02

ihorko


2 Answers

At last found it:

HttpContext.GetLocalResourceObject(virtualPath, resourceKey)
like image 122
ihorko Avatar answered Mar 07 '23 01:03

ihorko


Read the file in a StreamReader.

StreamReader SR;
SR = File.OpenText(Server.MapPath("~/App_globalResources/Litware.resx"));
string str = SR.ReadToEnd();
SR.Close();
like image 20
Peter Olson Avatar answered Mar 07 '23 03:03

Peter Olson