link button property to open in new tab?

前端 未结 8 1361
野趣味
野趣味 2020-11-27 07:15

In my application I have some link buttons there but when I right click on them I cannot (they are in disable mode) find the menu items Open in new tab or

8条回答
  •  天涯浪人
    2020-11-27 08:13

    1. LinkButton executes HTTP POST operation, you cant change post target here.
    2. Not all the browsers support posting form to a new target window.
    3. In order to have it post, you have to change target of your "FORM".
    4. You can use some javascript workaround to change your POST target, by changing form's target attribute, but browser will give a warning to user (IE Does), that this page is trying to post data on a new window, do you want to continue etc.

    Try to find out ID of your form element in generated aspx, and you can change target like...

    getElementByID('theForm').target = '_blank' or 'myNewWindow'
    

提交回复
热议问题