How to Read Notepad file as a teach in aspx Gridview or Another Control

Posted by Prabhakar under ASP.NET on 2/10/2011 | Points: 10 | Views : 2277 | Status : [Member] [MVP] | Replies : 7
Hi Friends

i want to read notepad file in aspx page and show data in any Control , gridview , repeater , , any Suggestion

Best Regard's
Prabhakar



Responses

Posted by: Naimishforu on: 2/10/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Depends on how you want to show the data in any control.

Reading notepad file is dam easy...just import System.IO and make use of streamreader/streamwriter.

Can you please give more details about your requirement??

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 2/10/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Naimishforu

My Full Requirement ..
i have 45 notepad file in a folder .. i want to read all files and want to all column save in database . any how . suggest me what's the right way ...



Best Regard's
Prabhakar

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/10/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi,

See, 45 or more, how many files are there in notepad that's not the issue.

The problem is, what's the content on of that file and how you want to store them into database?

For example,

You want to read all the notepad files, store the data into a string and just store the data of string variable into database??

In database, you will have 45 different entries for data??

Something like that??

Thanks

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/10/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
HI,

DO you want to show in grid or to save in db by reading the files alone?

Thanks
Karthik
www.f5Debug.net

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Madhu.b.rokkam on: 2/10/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
I believe you want to read all the 45 notepad files and save them in 25 columns in DB? if this is what you need, you can loop thru the files read the file content and store into db as well as show it on the grid based on what data you want to show.

Regards
Madhu

Thanks and Regards
Madhu

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 2/10/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Madhu.b.rokkam



i think you right madhu .. i am try to same thing . . hope so i am run this code with loop . .

Best Regard's
Prabhakar

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 2/11/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi , Everyone

i am solved my problem . . read this article ...

http://www.dotnetfunda.com/articles/article1169-read-all-notepad-files-in-a-folder-and-merge-all-notepad-files-data-in-as-.aspx



Best Regard's
Prabhakar

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response