OpenFileDialog in ASP.net
-
I have some problems with my web-pages. I want to show the OpenFileDialog, and the MessageBox in my web-pages like those of the .Net Framework. Please give me some advice...Thanks a lot.
Your C# code runs on the server, thus can have little-to-no direct control over the end user's machine, therefore you can't use .NET Windows Controls in a Web Form (for one thing, you have no idea if the user has the .NET Framework installed). For a MessageBox, you can just include some javascript in which you can use
alert("Hey user, I'm giving you a message here");
. An OpenFileDialog is more problematic, what do you want it for? If it's just for allowing the user to upload files, use the File Field HTML Control. Paul -
I have some problems with my web-pages. I want to show the OpenFileDialog, and the MessageBox in my web-pages like those of the .Net Framework. Please give me some advice...Thanks a lot.
WebApps does not have that flexibility. The only FileDialogControls that can be possible are: (*) HtmlInputFile (for file Upload) (*) DownloadFile (for save as, when Response.ContentType is not handled by a plugin/web browser) Perhaps if you use an ActiveX Control, subject to security restrictions, you may be able to use DialogControls. Deepak Kumar Vasudevan Personal Web: http://vdeepakkumar.netfirms.com/ I Blog At: http://deepak.blogdrive.com/
-
Your C# code runs on the server, thus can have little-to-no direct control over the end user's machine, therefore you can't use .NET Windows Controls in a Web Form (for one thing, you have no idea if the user has the .NET Framework installed). For a MessageBox, you can just include some javascript in which you can use
alert("Hey user, I'm giving you a message here");
. An OpenFileDialog is more problematic, what do you want it for? If it's just for allowing the user to upload files, use the File Field HTML Control. Paul