我正在使用此代码打开弹出窗口。
Public Sub ChkAvl_Click(sender As Object, e As EventArgs) Handles ChkAvl.Click
Dim query As String = "PreOrderItemAvailability.aspx"
Dim myWin As String = "window.open('" & query & "');"
ClientScript.RegisterStartupScript(Me.GetType(), "pop", myWin, True)
End Sub
<dx:ASPxButton ID="ChkAvl" runat="server" Text="Check Item Availability" BackColor="#D0E4FE" Cursor="pointer" EnableDefaultAppearance="False" Font-Names="Roboto" Font-Size="9pt" ForeColor="#2C4D79" CssClass="AdminPageBtn" OnClick="ChkAvl_Click" >
<Border BorderColor="#A3C0E8" BorderWidth="1px" />
</dx:ASPxButton>
但执行此操作时,没有任何事情发生.PreOrderItemAvailability.aspx无法打开。 那是为什么?
答案 0 :(得分:0)
如果您想打开弹出窗体,请按以下步骤操作:
VB.NET
Dim query As String = "PreOrderItemAvailability.aspx"
Dim myWin As String = "window.open('" & query & "');"
ClientScript.RegisterStartupScript(Me.GetType(), "pop", myWin, True)
在ASP.NET中:
string query = "PreOrderItemAvailability.aspx" ;
string myWin ="window.open('" + query + "');";
ClientScript.RegisterStartupScript(this.GetType(), "pop", myWin, true);