Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
Dear sir

I have some problem when i am implementing code in my project. I am trying to popup window without using click events.

I like to implements code when my first page is open(starting page) that time popup window display.

please give me information how to solve this problem or try to implements code...

thanks in advanced !!
Posted
Comments
Richard C Bishop 1-Oct-12 16:20pm    
Are you referring to a Modal Popup Extender in AJAX?
Member 8089110 2-Oct-12 0:12am    
sir,i am using modalpopup extender in ajax for popup window.but my condition is only the page should be started popup window.
jkirkerx 1-Oct-12 18:11pm    
What method are you using for your modal popup, every method has a way to show the panel or div tags on page.load
Member 8089110 2-Oct-12 0:14am    
Dear sir,
You just send your code i m trying to implements your code in my project but only my condition the page should be started on modal popup window without any click events..

thanks in advanced !!
Sergey Alexandrovich Kryukov 1-Oct-12 20:38pm    
Well, and what even should popup a window instead? And did you know that popup window is evil? Many would block it.
--SA

If you need the popup extender to open when the page loads, just do this in the code-behind in your respective language:

protected void Page_Load(object sender, EventArgs e)     
{
    if(!Page.IsPostBack)
    {
       ModalPopupExtender1.Show();
    }
}
 
Share this answer
 
v2
XML
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    
    <script type="text/javascript" language="javascript">


        function Myfun() {

            window.open("Compliaint.aspx", "target=_blank", "height=200,width=200,left=100");

        }


    </script>
</head>
<body onload="Myfun()" >
    <form id="form1" runat="server" >
    <div>
    <asp:Label runat="server" ID="lblMsg" EnableViewState="false"></asp:Label>
    </div>

    </form>



</body>
</html

>
 
Share this answer
 
in client side
JavaScript
$(document).ready(functoin()
{
 window.open("url");
});
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900