Click here to Skip to main content
16,019,618 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to pull all the content from the table row when I click the hyperlink.
So can I put the hyperlink in the database table.
EXAMPLE:

I have a policies table which has a policy ID and policy name as two fields.
So this policy is connected to a standards table(fields are standard number and standard url) which is connected by one-many relation.So I am putting this stanadrd URL in to the datatable.So the policy has many standards which I will put them in datatable and when I click it the standard document gets opened by populating the standard content fields.

Can this be done by keeping the hyperlink in to the database table.

Any suggestions or advice?
Posted

You don't need to keep the hyperlink in Database.

1. If you are binding the data to a GridView, then you can bind the PolicyID in one column and also u can make it DataKey of GridView.

2. Then you can have the hyperlink inside one ItemTemplate.

3. After that u have do some coding in GridView onRowCommand Event....

4. You have to use e.CommandArgument to get the selected row number and using the row Number you can find the corresponding Datakey Value which is the PolicyID for that particular row.

5. After getting the PolicyID, you can easily pull data from database for that ID.

Refer Using GridView and RowCommand Events[^] for one example.

I have shared the idea and logic how to do the task.
Now you have to implement that.
Please try to implement and come back with your codes, if you face any issues.

Thanks...
 
Share this answer
 
You can put a url into a column into a table.

If however you are asking if you can put some meta-data object tree (regardless of representation) into a column then basically the answer is no.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900