Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to look for example or guide, into setting up the following functionality, as explained below:

I have web application, where I am displaying text description(e.g. of data) such as one below:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Aenean arcu nunc, luctus vitae sodales vitae, tag1 quis sem. 
Integer nisl leo, iaculis vel mi ac, sagittis tag2 nisi. 
Suspendisse volutpat blandit nisi, eget pulvinar sem lobortis quis. 


In the description textbox, i have certain data which i would like to be represented as links, which link to table, showing corresponding data records, when clicked on (bold & underlined text), such as shown below:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
Aenean arcu nunc, luctus vitae sodales vitae, tag1 quis sem. Integer nisl leo, iaculis vel mi ac, sagittis tag2 nisi. 
Suspendisse volutpat blandit nisi, eget pulvinar sem lobortis quis. 


clicked on tag1, would lead to table, showing tag1 details:
Name	Value	SSC
Tag1	45	TL45
Tag1	15	YH56

I would like to know, what kind of sql queries i need to create for this task and what methods or properties, i could look into for implementing this task.

Please help. Thank you for your time and help.
Posted

You should look into RichTextBox, this control can handle links.

I found this project that probably answers some of your initial questions.

Links with arbitrary text in a RichTextBox[^]

Regarding the SQL query you need, I can't answer that without knowing your database structure.
Basically you could fill a DataTable using a DataAdapter
DataAdapter Class[^]

If you have a column called 'Name' in the datatable you can do something like this is in the code behind the link click.
C#
// Assuming you have a datatable called dtTagInfo that has been created beforehand.
DataRow dr = dataTable.Select(String.Format("Name = '{0}'", tagFromRichTextBox)).FirstOrDefault();
if (dr != null)
{
   // Present the information
}
 
Share this answer
 
v4
See this Example, This has a grid view pop up on click Button, you can change it to On Click of Link. I think this will useful for you.

http://aj-learning.com/blog/show-gridview-popup-window-asp-net/[^]
 
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