Hi cgisriram,
Refer below code.
Code
C#
protected void OnVerify(object sender, EventArgs e)
{
string landingPage = "Default.aspx";
// verify whether user is assigned with a popup window or not.
bool isAssigned = true;
if (isAssigned)
{
string url = "https://www.aspsnippets.com/";
string script = "window.open('" + url + "', 'popup_window', 'width=450,height=500,left=450,top=50,resizable=no');window.location='" + landingPage + "'";
ScriptManager.RegisterStartupScript(this, this.GetType(), "popup", script, true);
}
else
{
Response.Redirect(landingPage);
}
}
VB.Net
Protected Sub OnVerify(ByVal sender As Object, ByVal e As EventArgs)
Dim landingPage As String = "Default.aspx"
' verify whether user is assigned with a popup window or not.
Dim isAssigned As Boolean = True
If isAssigned Then
Dim url As String = "https://www.aspsnippets.com/"
Dim script As String = "window.open('" & url & "', 'popup_window', 'width=450,height=500,left=450,top=50,resizable=no');window.location='" & landingPage & "'"
ScriptManager.RegisterStartupScript(Me, Me.GetType(), "popup", script, True)
Else
Response.Redirect(landingPage)
End If
End Sub