Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2005, 03:18 AM
Authorized User
 
Join Date: Feb 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sajid_pk Send a message via Yahoo to sajid_pk
Default "SAVE" dialog in ASP.NET(VB.NET)

I have simple ASP.NET page in which I want to have a "BROWSE" button. When this browse button is pressed, standard WINDOWS save dialog should appear that should ask a filename. The path alongwith filename should be copied to text box with it. In other words, I am asking same functionality as <input type=file id=file1> gives but with the difference of SAVE dialoge instead of OPEN dialog. That is it. I am then writing data using streamwriter object to this file. Anyone knows how to do that?
 
Old June 15th, 2005, 04:45 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

The reason this doesn't already exists is because of the lack of save context.

If you write a file with a streamwriter in ASP.NET, your code is running on the server. Are you expecting to give the user to capability to browse the server's file structure for a save location? If you are expecting to choose a file location on the client's machine they you are no longer in the context of .NET. Then you must instead stream the data back to the user thru the HTTP stream and you have to let the browser deal with the symantics of the "Save As..." dialog box. If you stream back a file type that browser already knows how to handle, it might not force the user to "Save as..." but rather open the file directly up in an associated application (such as a PDF, XLS, DOC, TXT, etc.).

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASp.net dialog box monika.vasvani ASP.NET 1.0 and 1.1 Professional 2 January 7th, 2008 10:32 AM
call window dialog component with asp.net/vb.net s3ng ASP.NET 1.x and 2.0 Application Design 0 June 21st, 2005 04:54 AM
SAVE dialog in ASP.NET(VB.NET) sajid_pk ASP.NET 2.0 Basics 1 June 15th, 2005 10:40 AM
A Yes/No dialog equivalent under asp.net badgolfer ASP.NET 1.0 and 1.1 Basics 2 June 11th, 2004 09:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.