473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Open file dialog in ASP.NET application!

Hello!

Why can't I use the OpenFileDialog in a ASP.NETs ascx page? The class
inherits from the System.Windows.Forms, but when I put that into the ascx
file, it comes up with an compile error.

The type or namespace name 'Windows' does not exist in the class or
namespace 'System' (are you missing an assembly reference?)
Anyone used openfile dialog in asp.net? Using vs2003 and ASP.NET 1.1

- Lars
Nov 16 '05 #1
1 13810
Lars,

An ASP .NET page doesn't inherit from System.Windows.Forms. Even if you
did have a class that did, you couldn't use it. The reason for this is that
the processing takes place on the server side, and if you were able to throw
up a dialog, no one would be able to see it (it would come up on the server
side, with most likely no session, and never be responded to).

Rather, if you want to upload a file, you will have to use a file input
element (<input type:file>, I believe) to specify a textbox with a browse
button.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Lars Grøtteland" <lars@nospam> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl...
Hello!

Why can't I use the OpenFileDialog in a ASP.NETs ascx page? The class
inherits from the System.Windows.Forms, but when I put that into the ascx
file, it comes up with an compile error.

The type or namespace name 'Windows' does not exist in the class or
namespace 'System' (are you missing an assembly reference?)
Anyone used openfile dialog in asp.net? Using vs2003 and ASP.NET 1.1

- Lars

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ungvichian | last post by:
I am trying to write a program in VC++.Net that will read a text file with wireframe data in it and display the wireframe it represents. This link has a sample of the code I'm basing my program off...
2
by: nissiml | last post by:
hi, i'm trying to open a asp.net web page that list files from a Windows application like winword and select a file from it . what do i have to do to make it happen, is it simple ? Thanks in...
9
by: Amit D.Shinde | last post by:
How to enable user for selecting only folders and not the files with the Open File Dialog. i.e. I want only path of the selected folder is to be returned by Open File Dialog. i.e Open File Dialog...
0
by: Me | last post by:
I have an application that has a text box. At the end on the text box is the standard elypsis (command button) for launching the Open File Dialog box. I want the user to select a certain executable...
3
by: The ants are driving me crazy | last post by:
The open file dialog control in Windows forms has an "Open" button. Is there a way to change the text of the button to something other than "Open"?
2
by: Mattbooty | last post by:
Hello, Not sure if anyone else has seen this bug, but I have a form where the entire form is covered with a picturebox. The picturebox has a mouseup event. I also have an open file dialog for...
1
by: SAL | last post by:
Hello, Has anyone use the Open File Dialog Box in ASP.net? I know you can add the HTML File Field control to your ASP page and it will open the File Dialog Box for you. However, I would like...
4
by: AndersAnd87 | last post by:
Hello, everyone! I am trying to create an application like Notepad in Visual Basic 2005. But how can I make this application read all text from a text file without having to display an Open File...
4
by: nightscorpion | last post by:
Hello Gurus, i implemented the OpenFileDialog in my Windows Form Applications and it worked perfectly fine.However when it was run on a remote desktop i got the below error . ...
2
by: pandehrushikesh | last post by:
I am using Vista Business SP1. When I run some application "As Administrator" (even if I am administrator), Open file dialog does not show the mapped drive or network locations. any Idea???
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.