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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web page read local file system

Status
Not open for further replies.

celeron895

Programmer
Jan 29, 2002
81
0
0
US
Is it possible to have a C# ASP.NET web page read data from a web users local file system? I was told this was not possible unless the web server and file system where on the same network (or otherwise connected). How about using an ActiveX control?

Basically, I want the user to click a browse button on the web page. They then select a local file folder, and some data from file within that folder are displayed in a grid control on the web page.
 
The only way I can see doing this (without an activeX control or some serious java) would be to have the user use the fileupload component to upload the file to your webserver. then have the webserver process the file (or stream) converting it to a datatable or collection then using it as the source for a datagrid..

My 1c

Rob
 
We were trying to avoid using the upload technique that you were talking about.

So, this is possible using an activeX control? This will be part of a secure application, so there is no problem with forcing the user to install an ActiveX control.

Do you know of any examples that do this? I googled for some examples, but came up empty.
 
ActiveX controls get tricky (and it is probably easer to develop them in VB6 rather than DotNet) Dot Net does support Single Click depolyment, but that is an app that runs outside IE. To get Dot Net to build an activeX component you really need to jump a few hoops and it is probably easier not to (but I might be wrong - I just havn't pulled it off yet)

For an ActiveX control to work you need to have it marked as safe for scripting and safe for initializing.

The scripting part lets you call it's methods and the intiializing allows you to set initial parameters using Param Tags.

Then depending on the environment you might also need to get a digital certificate. WIthout it the browser won't let you download the control (depending on browser security)

For a vb 6 control to work you need to KNOW that your client is running a windows os..

Hoops and Hurdles..

HTH

Rob

 
and it runs ONLY in IE, half the time peolpe do NOT provide access for Controls (i wouldnt do it)...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top