Last post Jun 05, 2017 01:37 PM by Mikesdotnetting
Member
6 Points
80 Posts
Jun 05, 2017 12:40 PM|Ravindranath M|LINK
I am using StreamReader for reading html file, and i want to have html file path as i am using this in another computer. and need in generic way.
I am using this code in a class file. I tried everything but getting IIS relative path.
All-Star
187702 Points
27196 Posts
Moderator
Jun 05, 2017 01:37 PM|Mikesdotnetting|LINK
You should think about passing the path as a parameter to the method that uses the StreamReader.
Member
6 Points
80 Posts
Absolute Path for StreamReader in asp.net class file
Jun 05, 2017 12:40 PM|Ravindranath M|LINK
I am using StreamReader for reading html file, and i want to have html file path as i am using this in another computer. and need in generic way.
I am using this code in a class file. I tried everything but getting IIS relative path.
All-Star
187702 Points
27196 Posts
Moderator
Re: Absolute Path for StreamReader in asp.net class file
Jun 05, 2017 01:37 PM|Mikesdotnetting|LINK
You should think about passing the path as a parameter to the method that uses the StreamReader.
ASP.NET Tutorials | Learn Entity Framework Core | Learn Razor Pages