Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browse for a File and pass the Link

Status
Not open for further replies.

jon24422531

Technical User
Jan 27, 2004
295
GB
Hi guys

I thought this may be easy, but I am not sure it is now....

I have an internal website at our company and we have a "HelpDesk" application where our users can type out their requests and it is all saved to a SQL Server as are our replies etc. It works well thanks to all the help I've had from this site over the years.

Some of this work involves dealing with data in an excel file and our users have created the "HelpDesk" record but then have to send the link to the relevant file in a separate Email.

Now someone has suggested that the ability to browse for a File (a la Explorer) and create the link would be a great improvement, but I am not sure how to go about it. I am happy create a new field to store this link (or just put it in the body of the "HelpDesk" record i.e \\ServerName\D:\SomeFolder\ExcelFile.xls) but I am not sure how to create a "Browse For File" button.

Can this be done in ASP or do I need to fry my brain with JavaScript?

Thanks

Jonathan
 
You can search for a file with the HTML code:

Code:
<input type="file" name="some_file" />

Then the textbox is filled with the location of the file. Once you have that it's simple ASP to grap the file :)

~Ben
"Insert witty statement here
 
Ferrian

Thank you very much, I am so sorry to have wasted everyone's time.... I can't believe I have been so blind!

<input type="file"........ Basic stuff really.

Jonathan
 
So rarely think about using basic HTML that often I don't think about these things either. Definitely better to ask than fabricate something complex in the background which does the same thing!

~Ben
"Insert witty statement here
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top