views:

47

answers:

1

Hi all,

i use the asp.net(.aspx) language to develope my website. i want to create a module of news appearing in home page, and by clicking "more" you will get details in another page of news details !!

so i need help!

Thanks

+1  A: 

News Listing Page

You need a News Listing page... call it News.aspx

On this page, you will want to use the following:

You will want to use a Data Repeater. http://msdn.microsoft.com/en-us/library/cc488280.aspx

In the ItemTemplate of your DataRepeater Markup, you will want to include an asp.net hyperlink control with the text "Read More". Hyperlink control: http://www.w3schools.com/aspnet/control_hyperlink.asp

You need to set the NavigateURL attribute of the Hyperlink control equal to "ViewArticle.aspx?ArticleID=###" where ### is the ArticleID of the news article as defined in your database.

Also in the item template, you will list a snippet of that particular article's text.

News Viewing Page

call this page, ViewArticle.aspx

In the Page Load function of this page, you need to check the QueryString for the existence of an Article ID

Dim MyArticleID as integer = Integer.parse(Request.QueryString("ArticleID"))

Now that you have your ArticleID, you can pull the contents of the article from your database and display it on the page within a panel or any container of your choice.

hamlin11