Hyperlink with browse file button on InfoPath

hqdev
hqdev used Ask the Experts™
on
Hi,

We need to have a button on our Infopath Web Form that will prompt the user to browse for a file and this would add a link to the selected document.

We don't want to attach a file since the file is already someware on the Sharepoint site. The "Insert Hyperlink" control is out of the question, we don't want users to cut and paste the URL. We can't refer to a list to create a dropdown of the files since it can be on several lists.

I don't mind doing code behind, custom controls, rules or anything that can acheive this. I already have plenty of coding in the form anyway.

Thanks for any help.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Clay FoxDirector of Business Integration

Commented:
You can do this in code.

You could possibly look into IE history and give them a drop down like a Crtl+K does. Or give them the browse window and return the url rather than the target.

To me it is easier to control where they save things, tell them it must be in a certain library. Then you could query the library and they could just select the file and you could get the url that way.  You can query via webservice any list or library if you know where to look.

Author

Commented:
Thanks for your reply,

We are a large organization and users save documents in a lot of libraries, so it's impossible to query all the libraries in the form.
I have the mandate to make that form user friendly since we're move paper to electronic form. So I can't have the user doing cut and paste or type the URL by themself.
I'm now looking at ASP.NET page to achieve what I want ;(
Commented:
ASP.net is the solution, much more flexible then Infopath.

Author

Commented:
Found a workaround, using ASP.NET
How do I add a Browse button to Infopath, what is the code behind the button?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial