Trying to read my file at:-
Physical Path
h:\root\home\snookertable-001\www\site1\DisplayLatestNews
from the server where my site is hosted
if (!Page.IsPostBack)
{
if (System.IO.File.Exists(Server.MapPath("h:\\root\\home\\snookertable-001\\www\\site1\\DisplayLatestNews")))
{
System.IO.StreamReader StreamReader2 = new System.IO.StreamReader(Server.MapPath("h:\\root\\home\\snookertable-001\\www\\site1\\DisplayLatestNews"));
TextBox1.Text = StreamReader2.ReadToEnd();
StreamReader2.Close();
}
}
Just comes back with a non descriptive error, I have used "\\" instead of "\" as it does not like just the one backslash, any ideas please ?