.net - Is it bad practice to use LinkButtons as hyperlinks? -


I have a web page with a start page made up of various links. I used the link button control on System.Web.UI.WebControls for these links. I do a little bit processing on postback, then I redirect to the appropriate page. I think the problem is that I can not right click on "link" in IE 7 and open it in a new tab. Postback happens and a new page appears, but in the current tab, not a new one! I also tried to put together the web app in Chrome, and do not even give a choice when right clicking on the Chrome link

It seems that if the destination page needs to be opened in a new tab by the user , Then I need to use hyperlink or hyperlink control. However, it would be nice if I had the option of doing some processing before jumping on that link. Usually this is a bad practice like using a linkbutton like normal hyperlinks, and even worse than that. 302 redirects after returning the post.

  1. For one thing this browser breaks the interaction that you have already found
  2. But more importantly it breaks your site's search engine indexing, if You have an external site

In addition, you can still do some processing on the real hyperlink, but you do it in a different manor. If you tell us what you are doing then we can help in finding a better way.


Comments