Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. OpenFileDialog in ASP.net

OpenFileDialog in ASP.net

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdotnet
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vtalau
    wrote on last edited by
    #1

    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.

    P V 2 Replies Last reply
    0
    • V vtalau

      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.

      P Offline
      P Offline
      Paul Riley
      wrote on last edited by
      #2

      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

      E 1 Reply Last reply
      0
      • V vtalau

        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.

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        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/

        1 Reply Last reply
        0
        • P Paul Riley

          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

          E Offline
          E Offline
          ericms
          wrote on last edited by
          #4

          Can you show example on using the "File Field HTML Control" ? Thanks, Eric.-

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups