StreamReader cannot find the path

Posted by Bhuvana under ASP.NET on 5/23/2013 | Points: 10 | Views : 1283 | Status : [Member] | Replies : 1
hi
Am using direct folder path to get the file.
but the streamreader cannot be find the path it throw an exception
Could not find a part of the path Below am given my code

string strJSFile ="~/Artfiles"+ Path.ChangeExtension(l_dsresult.Tables["Table2"].Rows[0]["FileName"].ToString(), "js");
StreamReader oRead = new StreamReader(strJSFile);

Thanks & Regards
Bhuvana



Responses

Posted by: Niladri.Biswas on: 5/23/2013 [Member] Platinum | Points: 25

Up
0
Down
Check the value of "string strJSFile " and cross check if the path exists

Best Regards,
Niladri Biswas

Bhuvana, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response