Wednesday, September 21

PopUp window


<script language="javascript" type="text/javascript">
function OpenWindow()
{
    window.open ("LaundryBillPrint.aspx" ,
       "mywindow", "menubar=0,resizable=0," +
       "width=750,height=800,toolbars=0");
 window.close("LaundryBillPrint.aspx");
}
</script>

Take one Button as

<asp:Button ID="BtnPrintLndr" runat="server" Text="Print Bill" Width="84px"
                              BackColor="#339933" ForeColor="White" OnClick="BtnPrintLndr_Click" />

In code part write


 protected void BtnPrintLndr_Click(object sender, EventArgs e)
    {
     
       //Server.Transfer("LaundryBillPrint.aspx");
        BtnPrintLndr.Attributes.Add("OnClick", "return OpenWindow();");//it will call the javascript functions
       // BtnPrintLndr.Attributes.Add("onclick", "window.open('LaundryBillPrint.aspx','','height=300,width=300');return false");
// it directly redirects to ur respected page which you have provided.
    }


1 comment:

Please don't spam, spam comments is not allowed here.

.

ShibashishMnty
shibashish mohanty