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. Advertising

  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. Advertising

  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. Advertising

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,421
    Scott Allen
    Jun 4, 2005
  2. hazz
    Replies:
    6
    Views:
    49,798
    SkyUCHC
    Jun 9, 2010
  3. Harry Barker
    Replies:
    2
    Views:
    529
    Alf P. Steinbach
    Apr 19, 2006
  4. 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:
    147
    Peter J. Holzer
    Jul 24, 2006
  5. crea
    Replies:
    2
    Views:
    423
    Nobody
    Dec 28, 2012
Loading...

Share This Page