Storing Hyperlinks

G

Guest

Hi Experts

I have a working c# application that users can store files (.doc, .xls,
..bmp, etc) as binary data into an Access database. I now need to extend this
to also store hyperlinks.

First of all I need some way of searching for the hyperlink. In Access there
is an Insert Hyperlink dialog that can be used. Is there a similar dialog in
c#? At the moment I use the OpenFileDialog to select files to be stored,
could this be modified?

If it's possible to store the hyperlinks in the Access database, then I also
need to display these on my c# windows form, so the users can go straight to
a particular website. What is the best way to display the hyperlinks? Could
it be done in a list or DataGridView?

Many thanks
 
N

Nicholas Paldino [.NET/C# MVP]

Why not just store the string of the URL in the database? In addition
to that field, I assume you have to have another field with the name of the
file, or the type of the data stored in the field. If not, then how do you
know how to process it later?

In that other field, which has what kind of data is in the field, just
have a type in there that indicates the content is a URL.

I don't know how you could use the Insert Hyperlink dialog from Access.

If you are going to display the column contents, I would select the data
from the database, convert it to a string column (since it is binary, and I
don't know the encoding you are going to use), and then display that in a
custom data grid column which will act as a hyperlink. You would have to
create a custom column style for this already.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top