Deleting Content of a text file

Discussion in 'ASP .Net' started by GMK, Mar 4, 2005.

  1. GMK

    GMK Guest

    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.
     
    GMK, Mar 4, 2005
    #1
    1. Advertisements

  2. 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/d...en-us/cpguide/html/cpconwritingtexttofile.asp

    --
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com


    "GMK" <> wrote in message
    news:...
    > 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.
    >
    >
     
    Manohar Kamath, Mar 4, 2005
    #2
    1. Advertisements

  3. GMK

    GMK Guest

    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" <> wrote in message
    news:#...
    > 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/default.asp?url=/library/en-us/cpguide/htm
    l/cpconwritingtexttofile.asp
    >
    > --
    > Manohar Kamath
    > Editor, .netWire
    > www.dotnetwire.com
    >
    >
    > "GMK" <> wrote in message
    > news:...
    > > 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.
    > >
    > >

    >
    >
     
    GMK, Mar 5, 2005
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis Esteban Valencia Muñoz
    Replies:
    3
    Views:
    1,609
    Scott Allen
    Jun 4, 2005
  2. TheKeith
    Replies:
    20
    Views:
    109,524
    Chris Morris
    Oct 29, 2003
  3. hazz
    Replies:
    6
    Views:
    52,074
    SkyUCHC
    Jun 9, 2010
  4. Harry Barker
    Replies:
    2
    Views:
    667
    Alf P. Steinbach
    Apr 19, 2006
  5. Joey Martin

    Deleting blank lines from text file

    Joey Martin, Aug 30, 2005, in forum: ASP General
    Replies:
    1
    Views:
    301
    Evertjan.
    Aug 30, 2005
  6. pozz

    Deleting first N lines from a text file

    pozz, Nov 15, 2011, in forum: C Programming
    Replies:
    26
    Views:
    2,604
    Dr Nick
    Dec 16, 2011
  7. Markus Hänchen

    Perl not deleting file content if file on server

    Markus Hänchen, Jul 24, 2006, in forum: Perl Misc
    Replies:
    3
    Views:
    228
    Peter J. Holzer
    Jul 24, 2006
  8. crea
    Replies:
    2
    Views:
    619
    Nobody
    Dec 28, 2012
Loading...