Hello world! I've got a problem... im using a streamreader to read the text lines, but when i call the location of the text file it says:"Could not find a part of the path 'C:\Program Files (x86)\Common Files\Microsoft Shared\DevServe r\10.0\~\IDS\La ng\1.txt'." But i have a hyperlink with the same relative path, and it works :/ What am i doing wrong? i need this to work in a server in the future..
Code:
StreamReader reader = new StreamReader(@"~/IDS/Lang/1.txt"); string strAllFile=reader.ReadToEnd().Replace("\r\n","\n").Replace("\n\r","\n"); string[] arrLines = strAllFile.Split(new char[] { '\n' }); TextBox35.Text = arrLines[0] + arrLines[1] + arrLines[2]; reader.Close();
Comment