Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. problem in reading data from (.dat) file

problem in reading data from (.dat) file

Scheduled Pinned Locked Moved ASP.NET
helptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    souravghosh18
    wrote on last edited by
    #1

    In my application i want to read data from a (.dat) file line wise.can anyone give me a clue, how to achieve it. Thanks in advance.

    P A 2 Replies Last reply
    0
    • S souravghosh18

      In my application i want to read data from a (.dat) file line wise.can anyone give me a clue, how to achieve it. Thanks in advance.

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      Search in article section of code project. You will find many articles.

      Parwej Ahamad http://parwej.wordpress.com/

      1 Reply Last reply
      0
      • S souravghosh18

        In my application i want to read data from a (.dat) file line wise.can anyone give me a clue, how to achieve it. Thanks in advance.

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        souravghosh18 wrote:

        In my application i want to read data from a (.dat) file line wise.

        By .dat file, i beleive you want to mean the text file with .dat extentaion

        souravghosh18 wrote:

        can anyone give me a clue, how to achieve it.

        Try Following :

        static void Main(string[] args)
        {
        StreamReader StrReader;
        string Str;
        StrReader = File.OpenText("e:\\sample.dat");
        Str = StrReader.ReadLine();
        while (Str != null)
        {
        Console.WriteLine(S);
        Str = StrReader.ReadLine();
        }
        StrReader.Close();
        }

        Now, This is nothing to related with ASP.NET. So from the next time post question in proper forum :)

        cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups