473,753 Members | 7,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Save a file

hi,

i have a textbox in a form. when you press a Save button, a savefiledialog
appears. creating ther file works but everytime you click save, the dialog
appears. how do i make the dialog appear once and then only save the file?

thanx
--
Alvo von Cossel I of Germany
Nov 17 '05 #1
2 2368
I don't understand where the textbox comes into it. How is that
relevant to what your save button does?

In any case, you would have to save the filename the user chooses the
first time, and persist it someplace where you can get at it in
subsequent saves. Then you would bypass the save as dialog thereafter.
Depending on your requirements you might check to make sure the file
exists, too.

Often, though, the presence of the SaveAs dialog would be desirable even
for subsequent saves. Maybe the user wants to save another copy of the
file, for instance, or change the location. You could default the
filename to be the same as last time and then the user just has one
extra mouse click with the dialog if they don't want to change anything.

--Bob

Alvo von Cossel I wrote:
hi,

i have a textbox in a form. when you press a Save button, a savefiledialog
appears. creating ther file works but everytime you click save, the dialog
appears. how do i make the dialog appear once and then only save the file?

thanx

Nov 17 '05 #2
hi,

well the textbox contains the text that i want to save. thanks for the answer
--
Alvo von Cossel I of Germany
"Bob Grommes" wrote:
I don't understand where the textbox comes into it. How is that
relevant to what your save button does?

In any case, you would have to save the filename the user chooses the
first time, and persist it someplace where you can get at it in
subsequent saves. Then you would bypass the save as dialog thereafter.
Depending on your requirements you might check to make sure the file
exists, too.

Often, though, the presence of the SaveAs dialog would be desirable even
for subsequent saves. Maybe the user wants to save another copy of the
file, for instance, or change the location. You could default the
filename to be the same as last time and then the user just has one
extra mouse click with the dialog if they don't want to change anything.

--Bob

Alvo von Cossel I wrote:
hi,

i have a textbox in a form. when you press a Save button, a savefiledialog
appears. creating ther file works but everytime you click save, the dialog
appears. how do i make the dialog appear once and then only save the file?

thanx

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
6436
by: a | last post by:
Save text file as html kloepper 17:42 23 Jul '04 I'm using httpwebresponse and a StringBuilder to return a stream that originates as a file with the .txt suffix (My download code converts the html tags in this text file to well formed XHTML tags). The contents of the file contain html tags and the data in those tags. eg., <table cellSpacing=0 cellPadding=0 width="100%" align=center border=0> <TBODY> <tr> <td width="48%"></td> <td...
5
6894
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting downloaded before the Save As dialogue appears. As we will be downloading some large files, it's unpractical to have this. So far the code I have to download the file is
4
5559
by: Richard | last post by:
Hi I'm new to ASP/Web programming so any help would be appreciated... Situation: On my web page I would like to present a link {or button} that would allow the user to download a large file. When the user clicks to start the download I would like to display the "Save As" dialog, allow the user to name a place to save the file, and then show the download progress bar while the file downloads Question: How do I make a windows "Save...
4
4513
by: sunilj20 | last post by:
Hello, I have a requirement wherein, a user clicks on a file name in an ASP.NET web application, and the file should automatically be downloaded (Without showing the "Open", "Save As") in the local machine at a pre defined path (path defined in the registry), and launch the file in its associated application. I think this can be done through ActiveX Controls, but i dont know how to create ActiveX controls in .NET??
5
3505
by: Patrick | last post by:
Following on from the excellent example at http://www.c-sharpcorner.com/Code/2003/Sept/ExportASPNetDataGridToExcel.asp on how to save a data-grid to excel file, how can I extend the example such that when the user click on the button a popup appear in IE to say "Do you want to save or open file?"
10
4345
by: GJP | last post by:
Hello. Ive been asked to make my own notepade for college assignment. All ig going well, but i cant get the save to work. I can get Save a (shows dialog box), i can get it to just save too, but when i try to put an IF in it to check if the file has already been saved before, it will not save.
10
39512
by: Henok Girma | last post by:
Hello Gurus, I want to save the state of an unbound DataGridView on my Windows Form application to an XML file so i can later load it back.. Basically, on my form I have a DataGridView, it's got some DataGridViewTextBoxCell, DataGridViewComboBoxCell etc, i want to export all that to XML.. Any help is greatly appreciated.
1
6825
by: liuliuliu | last post by:
hi -- sorry if this is trivial -- but how do you make a screenshot of a pygame display? i have a surface which is basically the entire visible screen -- how do you write this surface as an image file during specific events in the script execution? image format doesnt matter. thanks! christine
3
8562
by: fiefie.niles | last post by:
I would like to save a web page to a file and have the hyperlinks work when I bring the file back up. If the web page has a hyperlink like the following <a href="OurWeb/News/abcFile.htm">, after saving the file and showing it on the screen, and you try to click on the link, it will try to go to C:\OurWeb\News\abcFile.htm instead of www.MyWebSite.com/OurWeb/News/abcFile.htm. If I am on the website www.MyWebSite.com, and do "File" - "Save...
3
6440
by: =?Utf-8?B?YXNkZg==?= | last post by:
Hello. I am making a web application with c# and am using this code: Response.ContentType = "application/x-excel"; Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("あいうえお") + ".csv"); Encoding encoding = Encoding.GetEncoding("Shift-JIS"); Response.BinaryWrite(encoding.GetBytes(csvStr)); Response.End(); It works fine..the data gets saved nicely to an excel file. The user pushes the...
0
9072
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9451
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8328
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6869
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4771
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4942
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3395
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2872
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2284
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.