Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-05-06 : 09:17:25
|
John writes "I have a table of movies with the idcode, title, rating, reviewed and url for the columns. I want to have the titles hyperlinked to the html pages in the url column. How do I do this?Thanks John Wilson" |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-05-06 : 09:29:23
|
What are you displaying the data in ? ASP ? or a VB App.Some info might helpDamian |
|
|
jwilsn
Starting Member
1 Post |
Posted - 2002-05-07 : 14:03:57
|
I am displaying the data in an aspx file created with VS using C#I have found a way to hyperlink columns in VS but I would like to know if I can have the hyperlinks in the sql table so that whatever method I display the table ie:asp,aspx,vb,frontpage the table willhave the hyperlinks allready there?Thanks John |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2002-05-07 : 19:13:00
|
I would look at creating a stored procedure that will build the <a href> tag into the resultset. You can do this with concatenation in SQL. Something like:SELECT '<a href=' + URLField + '>' + LinkDisplayTextField + '</a>'FROM myTable |
|
|
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2002-05-08 : 07:56:05
|
John,If you look in the Help Index under "hyperlinks, adding to DataGrid control" you will find what you are looking for. Basically, go to the Datagrid Property Builder, Columns and you will have a list of available columns from your SQL statement. If you scroll down on available columns, you will find one that says hyperlink. Adding a hyperlink column, you now have a selection for Text Field and Hyerlink Field where you can specify columns from your query for each, such as Title for Text Field and URL for the Hyperlink field.If you have any questions, let me know. I started learning asp.Net this week, so if you have any pointers, please let me know.JeremyEdited by - joldham on 05/08/2002 07:57:16 |
|
|
|
|
|
|
|