Ask a Question related to ASP.NET Building Controls, Design and Development.
-
slow learner #1
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
-
"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... -
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... -
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... -
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... -
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,... -
Nathan Sokalski #2
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
-
Steve C. Orr [MVP, MCSD] #3
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



Reply With Quote

