re:
This drives me nuts,I have put a textfile in App_GlobalResou rces.
App_GlobalResou rces is hard-wired for .resx files.
The files in App_GlobalResou rces are compiled into a namespace called Resources.
For each resource (string, image) in any resource file in App_GlobalResou rces,
ASP.NET will dynamically generate the static property for each.
re:
Should I put it in App_Data instead?
Yes.
re:
How do I read it from there?
Dim rdr As StreamReader = File.OpenText ("App_Data/a.txt")
or
Dim rdr As StreamReader = New StreamReader( File.Open("App_ Data/a.txt", FileMode.Open))
Then you can loop through the rows to get all the text.
Frankly, I'd write an xml file and place it in App_Data, instead of using a plain-text file.
It's far easier to get specific bits of info from an xml file than from a text file.
Good luck!
Juan T. Llibre, asp.net MVP
aspnetfaq.com :
http://www.aspnetfaq.com/
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
=============== =============== =====
"kurt sune" <ap*@apa.comwro te in message news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
This drives me nuts,I have put a textfile in App_GlobalResou rces.
How do I read it in runtime? I have googled for two days now.
GetExecutingAss embly.GetManife stResourceStrea m("XYZ.xml") returns nothing.
Should I put it in App_Data instead?
How do I read it from there?
/k