Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 819607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T02:20:16+00:00 2026-05-15T02:20:16+00:00

I am learning asp.net but I’m finding some problems. My doubt is how to

  • 0

I am learning asp.net but I’m finding some problems.
My doubt is how to make a list of titles of news contained in a database. And in this list, each of the titles when clicked is redirected to a page where you will be able to view the news in full (Title, Body, Author ..).
What I got:
– A database containing a table with the news, every news is associated with an identification code (ex: “ID”).
– A page where you will make the listing. (Ex: site / listofnews.aspx)
– I have a page that uses the method “querystring” to know what is the primarykey the news. (Ex: site/shownews.aspx?ID=12345, where “12345” is the primarykey of the news. Once it knows what is the primarykey of the news in the database, it loads each of the fields of the page (news.aspx) with the news, this part is working ok.
– The data is retrieve using the Linq, so I receive a List of “News”, the class “News” as ID, Title, Body, Author..
My doubt is how to make the listing clickable.

In php I used this method (make a list of html links, in each link the href field is changed so that the tag “id” coincides with the news):

//database used is oracle, $stmt is the query, you don´t need to understand how it works.
oci_define_by_name($stmt, "ID", $id);
oci_define_by_name($stmt, "TITLE", $title);
if (!oci_execute($stmt, OCI_DEFAULT)) {
    $err = oci_error($stmt);
    trigger_error('Query failed: ' . $err['message'], E_USER_ERROR);
}
echo '<br />';
while (oci_fetch($stmt)) {<------While there is data from the database , create links
$link = '<a href="site/shownews.php?ID='.$id.'" >'.$title.'</a>';<----the shownews.php?ID= $id, creates the link according with the ID
echo $link<---Prints the link
echo '<br />';
}

How do i make the same with asp.net?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T02:20:17+00:00Added an answer on May 15, 2026 at 2:20 am

    I would look into using the ASP.NET repeater control. Basically, you define a query for your items and assign it to the datasource of the repeater. From this, you can transform the data however you would like (links, images, li elements, etc). Please see the link below for more information. Read the entire article as .NET controls can be really nice, but have a lot to them and can be confusing somewhat especially coming from a scripting language (PHP, python, etc)

    Repeater Control Information

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.