473,385 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2346
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
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...
5
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...
4
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. ...
4
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...
5
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...
10
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,...
10
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...
1
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...
3
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...
3
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=" +...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.