Link to home
Start Free TrialLog in
Avatar of shanemay
shanemayFlag for United States of America

asked on

How to create dynamic links from a database

I am able to pull a list of stories from a database, however, I want to pull a list of stories and link to the page that displays the story.  For example I want to list the story title and have the story title be a link that links to page that displays a story based on the story ID.  

I can display the list of stories, and I have a page that will display the story based on an ID, however, how to I create the link for the title?

<a href="story.aspx?ID='storyID'>Story Title</a>

That is what I am trying todo.  

Thank you for any advice.  I am using c# with SQL server back end.
Avatar of the_bachelor
the_bachelor

Well a real rudimental way is to have
1. a Table (say tblStory with Columns StoryID, Title, Body)
2. you have maye a stored procedure that takes a storyID as a parameter and retrieves the table row associated with the ID
3. on the Story.aspx you have place holders to display the Title and the body.
ASKER CERTIFIED SOLUTION
Avatar of M3mph15
M3mph15
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shanemay

ASKER

Thank you for the help, with a little bit of modification that worked excatly like I needed it to.  I really appericiate your help.  Thanks.