473,545 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can i say that the data have a .txt ending?

9 New Member
If the program opens the saveFileDialog:
How can i say that the data have a .txt ending?
Oct 20 '11 #1
1 1444
GaryTexmo
1,501 Recognized Expert Top Contributor
Have a look at the MSDN page for a SaveFileDialog. ..
http://msdn.microsoft.com/de-de/libr...iledialog.aspx
(I even found you the German version :D)

Check out the Filter property. This takes a specific string format which will tell the dialog how it will find data. It basically works like this...

[quote]<description 1>|<pattern 1>|<descriptio n 2>|<pattern 2>|...|<descrip tion n>|<pattern n>"[/qouote]

So the code from the MSDN page reads as...

Expand|Select|Wrap|Line Numbers
  1. SaveFileDialog sfd = new SaveFileDialog();
  2. sfd.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
... and this means your save file dialog will have two options in the drop down, text files (which is first and thus default) and all files.
Oct 20 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1928
by: Lloyd Stevens | last post by:
TABLES CustomerTable CustomerTarrifTable TarrifTable WarrantTable CustomerID(P) CustomerTarrifID(P) TarrifNo(P) WarrantID(P) BoatType QuantityPurchased ProductName WarrantDate CustomerName Cost QuantitySold Season Cost TarrifNo Season CustomerID TarrifNo
2
20735
by: Fatih BOY | last post by:
Hi, I want to send a report from a windows application to a web page like 'report.asp' Currently i can send it via post method with a context like local=En&Username=fatih&UserId=45&Firm=none But the problem occures when i want to send a data with & sign (i.e: Firm=F&B). I try to solve this problem with using boundary, but i failed. Any...
2
1350
by: Peter | last post by:
I need to validate 4 fields on ASP.NET web page Starting Date __/__/____ Starting Time __:__ Ending Date __/__/____ Ending Time __:__ Staring Date + StartingTime can not be later then Ending Date + Ending Time (the starting and ending Times are dropdown boxes) How would I validate these two values with...
7
17272
by: Mark Waser | last post by:
Hi all, I'm trying to post multipart/form-data to a web page but seem to have run into a wall. I'm familiar with RFC 1867 and have done this before (with AOLServer and Tcl) but just can't seem to get it to work in Visual Basic. I tried coding it once myself from scratch and then modified a class that I found on a newsgroup (referenced...
4
2178
by: wesbland | last post by:
>From my understanding, when a string is stored in VB.NET and you look at it in the debugger, it has a quote on both sides to signify that it is a string as opposed to a char or int or whatever. I've got a simple program here (I actually found it on the web somewhere, but I'm looking through it) that doesn't seem to have that ending quote at...
0
5084
by: mix01 | last post by:
Hi, I am trying to get some VBA code working, but am preplex as to why it does not work. I would really appreciate any level of help. Many thanks, Mix01 Version of the program
1
1155
by: selvaraman | last post by:
Hi I need the code to read the data from the text file. And, i have the Starting Position and Ending Position of each Data. So, i want a funcition to give the data by passing the Starting Position and Ending Position as Input Parameters. Currently, i am using the objstreamreader to get the data. But, i dont think it is having the function...
10
2843
by: nflacco | last post by:
I'm tinkering around with a data collection system, and have come up with a very hackish way to store my data- for reference, I'm anticipating collecting at least 100 million different dataId whatevers per year, possibly much more. ---366 data tables ( one for each day of the year ), each row being assigned a unique DataId ( unique across...
1
9700
by: starter08 | last post by:
Hi, I have a C++ routine(client-side) which uploads an xml file to a web server by making a socket connection and sending all the post request through that socket. On the server side I have a cgi script which receives all the data and creates a file in the specified directory. If I am uploading only the file all works well, however I want to...
12
1837
by: DANNYOCEAN | last post by:
hello guys! how are you? I'd like to know to calculate the frequency/repetition of all possible numbers with the same ending (doing this for all endings from 0 to 1) for each line for example: line a:65 67 10 20 51 55 68 35 69 75 79 80 84 85 90 95 30 40 98 frequency of ending 0: 7 frequency of ending 1: 1 frequency of ending 2: 0...
0
7457
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7802
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...
0
7746
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3443
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...
0
3438
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1869
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
1
1010
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
693
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...

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.