我正在嘗試使用按鈕打開的URL。但在這種情況下,我沒有使用按鈕單擊事件,我正在使用命令名正確的代碼後面的網址。我可以轉到網址,但它發生在同一個標籤,但我希望它打開一個新的標籤。這裏是我使用如何使用vb.net中的按鈕在新選項卡中打開一個URL,該按鈕不是通過單擊事件使用命令名稱
<asp:Button ID="btneditinformation" runat="server" CommandName="editinformation" CausesValidation="false" ToolTip="Edit information in QuickBase" Text="Edit Information" Height="30px" Width="100px"
OnClientClick="aspnetForm.target ='_blank';"></asp:Button>
按鈕,這背後是我試圖提前使用
ElseIf e.CommandName = "editinformation" Then
Response.Redirect(url)
End If
感謝代碼
的網址是動態變化的。所以我不能使用javascript – LReddy