Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
PLEASE HELP ME OUT!!!

I Have an aspx page on which some News Articles are hardcoded.What I want is to Pull out these articles from a separate .Txt or .Doc file and show it on my page moreover, everytime i made changes to that file(txt or doc) it should reflect on my page(say new news articles are added and old ones are deleted).I don't want to hardcode the news articles.Some one told me about a control that will do this..Any sort of help or suggestions are appreciated.


I hope u understand my problem.
thanks for reading!!!
Posted

Thanks Guys for your kind help..but this is what i figured out after 2 hrs of Googling
www.dynamicdrive.com/dynamicindex2/ajaxticker.htm[^] May be this could help else i'll try your solutions..

Thanks a lot!!!!!
 
Share this answer
 
v2
Comments
vivektiwari97701 10-Oct-12 5:33am    
good Job.!!!!
Try Google[^], its called Content Management System (CMS)
 
Share this answer
 
Use literal control and Place literal control within Div control

if you are using Master Page It Would be better to write this code in master page's Page Load Event.

C#
 protected void Page_Load(object sender, EventArgs e)
{

string path = "YourTextFilePath";

if(!string.IsNullOrEmpty(path))

{

string[] readText = File.ReadAllLines(path);

StringBuilder strbuild = newStringBuilder();

foreach (string s in readText)

{

strbuild.Append(s);

strbuild.AppendLine();

}

Lit.Text = strbuild.ToString();

}

}
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900