How can I get the filename?

Results 1 to 3 of 3

Thread: How can I get the filename?

  1. #1
    Rob Guest

    Default How can I get the filename?

    I am using ASP to create a list of files that I have on the web server and listed in an Access database. When I link to a file on the list, I want to have the filename available from the second page so that I can display the filename on the screen. Can anyone help?<BR><BR>Currently:<BR><BR>Response.Write "&#060;A HREF=/scomments/"<BR>Response.Write objRS("FileName")<BR>Response.Write "&#062;"<BR>Response.Write objRS("CompanyName")<BR>Response.Write "&#060;/A&#062;"<BR><BR>When I link to the next page, I want to be able to use objRS("FileName")<BR><BR>I thought about passing the filename as a variable in the URL, but I don&#039t want to list two identical filenames together. <BR><BR>Thanks for your help!

  2. #2
    Brad Kingsley Guest

    Default RE: How can I get the filename?

    Well how about just writing a routine that uses the request.servervariables and reads what page is currently active. Then you won&#039t have to pass anything - each page will know it&#039s own name.<BR><BR>-Brad Kingsley, MCP - NT, IIS4<BR>Reliable Windows NT Web Hosting<BR>ORCS Web, Inc -<BR>

  3. #3
    Anon E Mous Guest

    Default RE: How can I get the filename?

    If you aren&#039t concerned with performance issues, try passing it as a Session level variable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts