OpenFileDialog?

J

Jan

Hi,

I am looking for a control that is similar to OpenFileDialog in Windows
forms for an ASP.NET web form. So when I click on a browser button, this
control can pop up for the user to open a file. Please give directions.
Thanks.

Jan
 
K

Kevin Spencer

What do you mean by "open a file?" A file is opened by some application.
What are you planning to do with the file?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
K

Kevin Spencer

Sorry for the confusion. I meant "select a file". So when a user clicks on
a

Again, if you select a file, you plan to do something with it. What would
that be?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
M

Mark

Would using the HTML control 'File Upload' work?


Jan said:
I want to save the selected image file to database.

clicks
on
a

Again, if you select a file, you plan to do something with it. What would
that be?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
clicks
on
a
button, a dialog box (which I don't know if there is such a control
for
web
 
D

David

Hi,

I am looking for a control that is similar to OpenFileDialog in Windows
forms for an ASP.NET web form. So when I click on a browser button, this
control can pop up for the user to open a file. Please give directions.

<input type="file" />

This is standard HTML, the browser will pop up an open-file dialog box
when the user clicks on the browse button, and then will submit the file
contents along with the form. How to handle it on the server side
depends a bit on what you're planning to do with the uploaded file.
 
K

Kevin Spencer

I want to save the selected image file to database.

Aha! In other words, you want to upload the file to the server, and save it
to a database. The HTML "input type=file" element is designed to do that.
There is also a .Net HtmlInputFile Control that you can use for this. Here
is alink to an article that describes the HtmlInputFile Control and how to
use it:

http://msdn.microsoft.com/library/d...s/cpgenref/html/cpconhtmlinputfilecontrol.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.


Jan said:
I want to save the selected image file to database.

clicks
on
a

Again, if you select a file, you plan to do something with it. What would
that be?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
clicks
on
a
button, a dialog box (which I don't know if there is such a control
for
web
 
J

Jan

Duh! I just noticed the html control File Field...

Jan said:
I want to save the selected image file to database.

clicks
on
a

Again, if you select a file, you plan to do something with it. What would
that be?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
clicks
on
a
button, a dialog box (which I don't know if there is such a control
for
web
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,839
Latest member
MartinaBur

Latest Threads

Top