I am using the streamreader to read from a file in the project..
StreamReader stRead = new StreamReader("textfile.txt");
while (!stRead.EndOfStream)
{
CheckBoxList1.Items.Add(stRead.ReadLine());
}
but i get an error:
Could not find file 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\textfile.txt'.
whereas the textfile is in my bin folder of the project.
C:\Users\xyz\Documents\Visual Studio 2008\Projects\WebApplication3\WebApplication3\bin\testfile.txt
If i use this path it works but i dont want to use the complete path...
Is there a way to do this???
thanks
how do i store the path as a reference in web.config file????