简体   繁体   中英

Updating a section of a page to show “News” (Without using a database) Asp.net C#

I want to have a news section to my page in a placeholder which can be updated relatively frequently with just Text and a Date.

But I do not want it to be linked to a Database, Is there a way this can be done?

If you are not prepared to use a Database, keep it as static content. Another option would be to use a simple text or xml file and read this in.

You could save the news as an RSS file (simply an XML file format suited for news) and then parse and display it in asp.net.

Here's a tutorial to get you started:

http://www.codeproject.com/KB/XML/RSSFeedEx.aspx

You could try using RSS feeds , example here

If by not linked you mean not bound , yeah. Use ajax to fetch news on a specified interval and append them to your element at client-side. If you're not talking about binding, then you need a news source which could be:

  1. An RSS feed
  2. An XML document
  3. A database
  4. A flat text file
  5. An Excel spreadsheet

and more sources, in which you have to someway write the code to fetch the information and update the UI. That's inevitable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM