views:

314

answers:

1

Does anyone know how to do something like this. Lets say I generate on server side using c# link. http://www.blah.com/blabla.aspx?test=blah&search=true

How could I on server side make it so when clicking on it (for now on HTML side i save this link as asp:label it will bookmark it.

Researching online showed solutions on client side by running java script. It appears that solution might be different based on browser. I am trying to make this work in Firefox, IE, and Chrome.

But if you know any solution that is fine too.

Thanks

A: 

There is nothing you can execute on the server to make this happen on the client as bookmarking a website is a feature of the browser client. You can, as you have discovered, use javascript on the client to automate this on the client.

If you want to do this simply (and cross browser), you could use jquery and a jquery plugin. One such plugin is JFav. This will bring up the save bookmark dialogue with the link and title from the hyperlink.

Careful that you don't abuse your power on the client's browser. I for one do not use built-in bookmarks (preferring Delicious), and would not appreciate this behavior.

HectorMac