Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reading a file from within an whatever.aspx.cs

3 views
Skip to first unread message

Zach

unread,
May 20, 2012, 12:58:09 PM5/20/12
to
How do I address a file to read from an *.aspx.cs?

Simply coding "whatever.txt" isn't doing the trick.
The "whatever.txt" is in with the rest of the classes and stuff costituting
the one project.

Zach.

Zach

unread,
May 20, 2012, 1:16:16 PM5/20/12
to
"Zach" <x...@xx.xx> wrote in message
news:4fb922a3$0$14714$5fc...@news.tiscali.nl...
For the sake of clarity, I know how to read from a text file,
I don't know how to name the source from which to read.
Zach

Arne Vajhøj

unread,
May 20, 2012, 2:10:41 PM5/20/12
to
On 5/20/2012 1:16 PM, Zach wrote:
> "Zach" <x...@xx.xx> wrote in message
> news:4fb922a3$0$14714$5fc...@news.tiscali.nl...
>> How do I address a file to read from an *.aspx.cs?
>>
>> Simply coding "whatever.txt" isn't doing the trick.
>> The "whatever.txt" is in with the rest of the classes and stuff
>> costituting the one project.

> For the sake of clarity, I know how to read from a text file,
> I don't know how to name the source from which to read.

You get the file name from either query parameter or
form field in the request.

If you return the file for download you can suggest a
filename to the browser on a HTTP header.

Arne


0 new messages