How to add "..." button to a property to open up "File Open"?

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default How to add "..." button to a property to open up "File Open"?

    I am creating a control and thinking about adding a property to the control.
    I will like a "..." button shown next to the value of this property when user
    clicks on this property. I want to open up standard "File Open" dialog box
    when the user then clicks on "..." button. Any suggestion or sample code?
    slow learner Guest

  2. Similar Questions and Discussions

    1. "Unable to open script file 'MM_findObj.js' (error 3)"
      Having started with ASP pages, I get this error message "Unable to open script file 'MM_findObj.js' (error 3)" when i goto the behaviours menu, or...
    2. animation "open" onPress( animation "close" ) go to Frame "myFrame"
      I have searched hi and low for the answer and nothing has helped me as of yet. My Main timeline is sectioned off by keyframes that are 10 frames...
    3. ALRT! Do NOT open or install the exe file in "FWD: Check out thesesecurity package from the M$"
      j e wrote: It very likely is the W32.Swen ("Swen") worm. See http://www.pcworld.com/news/article/0,aid,112552,00.asp -- -- Rory...
    4. Unable To Open File "..." Because It Is Already Open With Write Permission
      I am trying to open a page for offline browsing and whenever I try to open a particular link I get this "Unable To Open File '...' Because It Is...
    5. Button to launch the "File Open" dialog
      It can be done with a Windows Forms control, but the <INPUT type=file> would be the easiest way, it being designed for web pages and all... IMO,...
  3. #2

    Default Re: How to add "..." button to a property to open up "File Open"?

    That is something I tried to figure out for a while also, but once you see
    an example it is actually quite simple. Here is an example I used I created,
    along with the website that taught me how to do it:

    Private Sub btnDownload_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles btnDownload.Click
    Response.ClearContent()
    Response.ContentType = "text/plain"
    Response.AddHeader("content-disposition",
    "attachment;filename=download.txt")
    'Response.WriteFile(Server.MapPath("download.txt") )
    Response.Write("This is a test download text file" &
    ControlChars.NewLine)
    Response.Write(Date.Now.ToLongDateString() & " " &
    Date.Now.ToLongTimeString())
    Response.End()
    End Sub

    My example asks the user to download a text file that contains the string
    "This is a test download text file" followed by the date & time (note the
    two Response.Write lines). If you want to give the user a file instead, set
    the Response.ContentType to the appropriate string and use
    Response.WriteFile instead (I have this line commented out, you will have to
    uncomment it). You can also, if you want, use a combination of WriteFile and
    Write when sending a text file. For more details, see the following site
    which is where I learned how to do this:

    [url]http://www.dotnetspider.com/technology/kbpages/553.aspx[/url]

    Good Luck!
    --
    Nathan Sokalski
    [email]njsokalski@hotmail.com[/email]
    [url]http://www.nathansokalski.com/[/url]

    "slow learner" <slowlearner@discussions.microsoft.com> wrote in message
    news:C6F64371-3DDD-4DBA-B774-25901FD32708@microsoft.com...
    >I am creating a control and thinking about adding a property to the
    >control.
    > I will like a "..." button shown next to the value of this property when
    > user
    > clicks on this property. I want to open up standard "File Open" dialog box
    > when the user then clicks on "..." button. Any suggestion or sample code?

    Nathan Sokalski Guest

  4. #3

    Default Re: How to add "..." button to a property to open up "File Open"?

    You'll probably want to use the Editor Attribute, as demonstrated in this
    code sample:
    [url]http://SteveOrr.net/articles/InheritAndExtend.aspx[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    [url]http://SteveOrr.net[/url]





    "slow learner" <slowlearner@discussions.microsoft.com> wrote in message
    news:C6F64371-3DDD-4DBA-B774-25901FD32708@microsoft.com...
    >I am creating a control and thinking about adding a property to the
    >control.
    > I will like a "..." button shown next to the value of this property when
    > user
    > clicks on this property. I want to open up standard "File Open" dialog box
    > when the user then clicks on "..." button. Any suggestion or sample code?

    Steve C. Orr [MVP, MCSD] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139