Hi Friend,

I'm trying to open a page in the New Window by using the 
Response.Redirect command, but I couldn't succed. It opens a page in 
the same window.

Please help me out from this problem or if you have any 
suggestion/alternative of the above cited problem then please let me 
know.

Here I'm also enclosing the code for your reference.

*******************************************************

Save as Buttons2.aspx
-----------------------
<[EMAIL PROTECTED] Language=VB Debug=True %>
<Script runat="server">

Sub SubmitBtn_Op(ByVal Sender as Object, ByVal E as CommandEventArgs)

If E.CommandArgument.CompareTo("OP") = 0 Then
        Response.Redirect("./Hello.aspx")
End If

If E.CommandArgument.CompareTo("OPN") = 0 Then
        
        ' Response.Redirect("./Hello.aspx")
        ' but this time it must open in new window
lblMessage.Text = "It Must Open in New Window! But HOW ???"
End If

End Sub
</Script>
<html>
<body>
<form runat="server">
<BR>
<BR>
<BR>
<asp:Button
        id="btn1"
        text="Open Page"
        CommandArgument = "OP"
        CommandName = "Open New"
        OnCommand="SubmitBtn_Op"
        runat="server"
/>
<BR>
<BR>
<BR>
<asp:Button
        id="bnt2"
        text="Open Page in New Browser"
        CommandArgument = "OPN"
        CommandName = "Open New"
        OnCommand="SubmitBtn_Op"
        runat="server"
/>

<asp:Label
        id="lblMessage"
        runat="Server"
/>
<BR>
<BR>
<BR>
</form>
</body>
</html>

***************************************************
Save as Hello.aspx
-----------------------
<html>
<body>
<H1> Hello This is a Testing Page
</H1>
</body>
</html>

-----------------------------------------------

Note: I have to do this thing from a button which calls a function, 
Its my project requirement and above code is the dummy one

Looking forward to your kind reply.

Regards,
Mustafa Bamboat



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
---------------------------------------------------------------------~->

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to