Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 browse

Author  Topic 

notsosuper
Posting Yak Master

190 Posts

Posted - 2005-06-13 : 12:25:04
How can I make directory point to certain server, path and filename when user hits browse button to search certain files?

MichaelP
Jedi Yak

2489 Posts

Posted - 2005-06-13 : 12:52:59
I'm pretty sure you can't. It's a security thing.
If you made an Active X control that performed your file upload stuff, you could control the path in that control.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

notsosuper
Posting Yak Master

190 Posts

Posted - 2005-06-13 : 13:11:08
I am talking about input type = "file" will give me a browse button and text box right. I need when user hit the browse button to look for files, I need user to see certain server, path and files, are you saying this is not possible?
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2005-06-13 : 13:33:23
Yes, that's exactly what I'm saying. The Input="file" does not allow you to set a "starting path" to search for files.

As al alternative to the input=file tag, you could create an Active X control that handles that stuff for you, and that would allow you to set the starting path. Needless to say, this isn't easy.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

notsosuper
Posting Yak Master

190 Posts

Posted - 2005-06-13 : 13:47:41
Thank you so much being patient with me, but I will go over this one last time to make sure hundred percent before I go my boss and say it is not that easy to that.

I have done simple browse file thing before, when user hits browse button it will pop ups search file window with user selects the whatever path and filename to upload the file, now I need not what user wants I need when user clicks browse button user only should be limited to \\certain server\certain folder\ certain filename with no space. and only files ends with .pdf nothing else. And please tell me again this is doable but it needs to be activex type of things needs to be involve and not easy.Or any other way?
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-06-13 : 13:57:30
You can have the browse functionality, but you cannot force the user to be on a specific path. This is based on the default .net controls, however you can write your own activex control and embed it into your webpage to do this.




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

notsosuper
Posting Yak Master

190 Posts

Posted - 2005-06-13 : 14:40:16
Thank you so much, how about if I do that in validation code, how would I do that? I would be able to limit user to choose only certain server and path?
Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2005-06-13 : 15:59:44
IT CAN NOT BE DONE WITH NATIVE HTML. PERIOD. NO AMOUNT OF HTML OR JAVASCRIPT WILL MAKE IT WORK!

An ActiveX control is the ONLY way to control what files the user gets to choose from and what path that they are in.

Maybe a web-enabled application would be better for this application?
Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page
   

- Advertisement -