473,624 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Deleting Content of a text file

GMK
Dear all
in my asp.net application i have a text file that is installed with my
application on the server.
this text file is filled with data through a web interface in my
application.
i need to know how could i update this text file programatically and using a
web interface.
what i need is not to over write the content of the text file but to delete
it's content and then write a new content.
id there any way to do this?
thank you.
Nov 19 '05 #1
2 1537
What is the difference between deleting the content and writing, and just
overwriting? Could you delete the file and create the file again with the
same name, but different content?

http://msdn.microsoft.com/library/de...texttofile.asp

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"GMK" <x@x.com> wrote in message
news:em******** *****@tk2msftng p13.phx.gbl...
Dear all
in my asp.net application i have a text file that is installed with my
application on the server.
this text file is filled with data through a web interface in my
application.
i need to know how could i update this text file programatically and using a web interface.
what i need is not to over write the content of the text file but to delete it's content and then write a new content.
id there any way to do this?
thank you.

Nov 19 '05 #2
GMK
well this could be a way to solve my problem but when ever you intall your
application using a setup project and then you want to uninstall it the text
file created by your apllication will not be removed becasue it wasn't a
part of the setup.
so i have to include my text file with the setup it will be empty, the user
will fill it but when i want to update i have to delete it's content without
deleting the phisycal text file.
"Manohar Kamath" <mk*****@TAKETH ISOUTkamath.com > wrote in message
news:#z******** ******@TK2MSFTN GP14.phx.gbl...
What is the difference between deleting the content and writing, and just
overwriting? Could you delete the file and create the file again with the
same name, but different content?

http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconwritingtex ttofile.asp
--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"GMK" <x@x.com> wrote in message
news:em******** *****@tk2msftng p13.phx.gbl...
Dear all
in my asp.net application i have a text file that is installed with my
application on the server.
this text file is filled with data through a web interface in my
application.
i need to know how could i update this text file programatically and
using a
web interface.
what i need is not to over write the content of the text file but to

delete
it's content and then write a new content.
id there any way to do this?
thank you.


Nov 19 '05 #3

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

Similar topics

2
1340
by: Rob | last post by:
Hi everyone, I have a form that has several disabled text fields. In these text fields, I have initial values. Next to each text field lies a "copy" button. When clicked, the content of the disabled text field is appended to the content of another textfield, the only one that isn't disabled (therefore the user can copy content from the other text fields, and also add what they want). I also have a remove button, which clears the content...
0
1398
by: Hrvoje Vrbanc | last post by:
Hello, this is a problem I came upon while building a site based on MCMS 2002 but it's not strictly MCMS-oriented: I have a page that displays a certain content in presentation mode but when an editor clicks "Switch To Edit Site" in MCMS console on the page, the page displays a different content, an interface that editor use for upload and deleting files on the web server. There are no problems with the upload but there is a problem...
6
4554
by: Martin Bischoff | last post by:
Hi, I'm creating temporary directories in my web app (e.g. ~/data/temp/temp123) to allow users to upload files. When I later delete these directories (from the code behind), the application restarts and all active sessions are terminated. This error is also described in detail here:...
5
2678
by: George | last post by:
VB.net 2003 standard, XP windows home edition. Installed first application OK today. When I removed the application via Control Panel, there were no problems and the app folders were deleted. But when I installed the app from a CD-ROM (Release folder is in D:), when I remove the app in Control Panel these problems occur: Control Panel does not delete the application folders. When I try to delete them I get message "Cannot delete file:...
2
1708
by: SiouxieQ | last post by:
Hi there, I'm using the code below to try to delete a name from a list of names in a file. Unfortunately it doesn't quite do what I want it to. Instead of looking for the name in the textbox and deleting that it is just deleting the first line of data in the file.
2
3107
by: Muzzy | last post by:
Hi, I've used information on these newsgroups to build many pages. So I thought that now that I have my script working (something that I've been working on for about a week), I should post it so that it may help others. If posting this script is against the rules in this group then please accept my appologies. I developped this script so that I can add and remove rows in a table in which I have various input fields and I would use the...
3
2126
by: showson1 | last post by:
Hi all. We have some files that are basically TIF images with a text header. The header portion is blocked by {startdb} and {enddb}.. it is the same format for all the files. What I need to do is read the file in, delete that block (including the startdb and enddb) and write out the result as a TIF. I can manually do this by loading them in a HEX editor, deleting the block and saving it, opens fine... I'm just not sure how to do it...
6
1794
by: keeps21 | last post by:
I'm having a bit of trouble creating a page to delete a story from the content table in my database. I have checked my DELETE query directly in phpmyadmin and it is working fine. I am echoing the query to check that it comes out as expected and it looks fine. The problem seems to be that when my code is run the record never gets deleted. Meaning that mysql_affected_rows() is always -1 and therefore an error message - 'Could not...
3
3912
by: nigelesquire | last post by:
Please help! I'm trying to clone and delete multiple rows with JavaScript. I need two delete buttons that work...! I only have one for now, but it's not working properly, the output count is messing up. Problems:
0
8233
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8170
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8675
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8619
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...
1
8334
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7158
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 project—planning, coding, testing, and deployment—without 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
6108
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
4078
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...
1
1784
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.