Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all i have a problem that my ajax is not working properly.Even it shows the popup but for very
less time span.I am using vs 2008.plz help where am i wrong.I cant track the problem.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 80%;
        }
        .ModalPopupBG
        {
            background-color: #666699;
            filter: alpha(opacity=50);
            opacity: 0.7;
        }
        .HellowWorldPopup
        {
            min-width: 200px;
            min-height: 150px;
            background: white;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        
        <table align="center" class="style1">
            <tr>
               
                <td>
                    <asp:Button ID="Button1" runat="server" Text="Button" />
                    <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="ModalPopupBG"
                        PopupControlID="Panel1" TargetControlID="Button1" BehaviorID="ModalPopupExtender1">
                    
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Panel ID="Panel1" Style="display: none" runat="server">
                        <div class="HellowWorldPopup">
                       
                                    This is a simple modal dialog
                            
                        </div>
                    
                </td>
            </tr>
            <tr>
                <td>
                     
                </td>
            </tr>
            <tr>
                <td>
                     
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
Posted
Updated 1-Oct-11 2:28am
v2

1 solution

You set the display property of panel as none
may be that is your problem
remove that and try once.

and after div close, close the asp:panel tag
 
Share this answer
 
v3
Comments
mylogics 1-Oct-11 8:17am    
no this is not prob i think its postback related problem or something else.
P.Salini 1-Oct-11 8:24am    
are you getting any error
Ravinder Singh Bhawer 1-Dec-11 2:39am    
M facing same problem pls anyone reply with solution

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