Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Modalpopupextender displaying at page load

$
0
0

I am using modal popup extender, and an asp button on my webpage to display some different messages as per the loggedin user. While user click on submit the page displays a message in popup box. Simply this application is running prefectly on my development machine. But when i upload it to hosting space modalpopup displays on the page load and remains on the page.

I am sending the code which i used in application. Please help me to solve this issue.

In all cases, application is running as required and good on local machine, but raising problem on server.

For live demo of the page please visit

http://www.uttarakhandtemples.in/webform1.aspx

Thank you

Vinay KD

Webpage HTML

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="UKTemples.WebForm1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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>Untitled Page</title>
    <style>
        .modalBackground                    {background-color:#3A3A3A; filter:alpha(opacity=70); opacity:0.65;}
        .pop-up-box                            {width:600px; height:280px; margin-top:50px; margin-left:50px; background-color:#fcfcfc; border:solid 2px #efefef; color:#5a5a5a; padding:15px; position:relative;}
        .pop-up-box-heading                    {background-color:#fcfcfc; height:20px; border-style:solid; border-width:0px 0px 1px 0px; padding-bottom:2px;}
        .pop-up-box-imgtd                    {width:150px; height:200px; background-color:#fcfcfc; text-align:center; vertical-align:middle;}
        .pop-up-box-messagetd                {background-color:#fcfcfc; font-size:14px; line-height:1.6; vertical-align:middle;}
        .pop-up-box-closebutton-wrapper        {position:absolute; width:30px; top:10px; right:5px;}    
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>    
        
        <asp:Button ID="Button1" runat="server" Text="Button" />
        
        <div style="height:0px;">
        <asp:Panel ID="Panel1" runat="server" class="pop-up-box">
            <table cellpadding="0px" cellspacing="10px" style="width:600px; font-family:tahoma;">
                <tr>
                    <td class="pop-up-box-heading" colspan="2">
                        Success
                    </td>
                </tr>
                <tr>
                    <td class="pop-up-box-imgtd">
                        <img src="/images/success-tick.png" style="width:120px;" />
                    </td>
                    <td class="pop-up-box-messagetd">
                        <asp:Literal ID="ltr_message" runat="server"></asp:Literal>
                    </td>
                </tr>
            </table>
            <div class="pop-up-box-closebutton-wrapper">        
                <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="/images/red-close-button-2.png" Width="30px" />
            </div>
        </asp:Panel>        
        </div>
        
        <asp:HiddenField ID="hdn_Refresh_vwstate" runat="server" />
        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground" PopupControlID="Panel1" cancelcontrolid="ImageButton1" targetcontrolid="ImageButton1">
        </cc1:ModalPopupExtender>
    </div>
    </form>
</body>
</html>

Server Side Code, (code behind)

Public Partial Class WebForm1
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'ModalPopupExtender1.Hide()
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        ModalPopupExtender1.Show()
    End Sub
End Class

Web.Config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>  
    <configSections>
    <!-- FOR URL REWRITER -->
    <section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
    <!-- FOR URL REWRITER -->
      <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
            <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
            </sectionGroup>        
        </sectionGroup>
    </sectionGroup>
    </configSections>
    <appSettings />
    <connectionStrings>
        <add name="CONNECTION_TO_DATABASE" connectionString="server=localhost;userid=myuserid; password=secret345; database=applicationdb; pooling=false;" />
    </connectionStrings>    
    
    <system.web>
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.

            Visual Basic options:
            Set strict="true" to disallow all data type conversions
            where data loss can occur.
            Set explicit="true" to force declaration of all variables.
        -->
        <compilation debug="true" strict="false" explicit="true">
            <assemblies>
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />                
            </assemblies>
        </compilation>
        <pages>
            <namespaces>
                <clear />
                <add namespace="System" />
                <add namespace="System.Collections" />
                <add namespace="System.Collections.Generic" />
                <add namespace="System.Collections.Specialized" />
                <add namespace="System.Configuration" />
                <add namespace="System.Text" />
                <add namespace="System.Text.RegularExpressions" />
                <add namespace="System.Linq" />
                <add namespace="System.Xml.Linq" />
                <add namespace="System.Web" />
                <add namespace="System.Web.Caching" />
                <add namespace="System.Web.SessionState" />
                <add namespace="System.Web.Security" />
                <add namespace="System.Web.Profile" />
                <add namespace="System.Web.UI" />
                <add namespace="System.Web.UI.WebControls" />
                <add namespace="System.Web.UI.WebControls.WebParts" />
                <add namespace="System.Web.UI.HtmlControls" />
            </namespaces>
            <controls>
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            </controls>
        </pages>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
    <authentication mode="Windows" />
    <customErrors mode="Off" />
        <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
        <httpHandlers>
            <remove verb="*" path="*.asmx" />
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
        </httpHandlers>
        <httpModules>
            <!-- FOR URL REWRITER -->
            <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
            <!-- FOR URL REWRITER -->
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        </httpModules>
        <httpRuntime maxRequestLength="1024000" executionTimeout="3600" />
    </system.web>
 
    <system.codedom>
        <compilers>
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                <providerOption name="CompilerVersion" value="v3.5" />
                <providerOption name="OptionInfer" value="true" />
                <providerOption name="WarnAsError" value="false" />
            </compiler>
        </compilers>
    </system.codedom>
    <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
    <system.webServer>
    <!-- FOR URL REWRITER -->
        <modules runAllManagedModulesForAllRequests="true">
        <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
        </modules>
        <validation validateIntegratedModeConfiguration="false" />
    <!-- FOR URL REWRITER -->
    <directoryBrowse enabled="false" />
    <defaultDocument>
      <files>
        <clear />
        <add value="default-home.aspx" />
      </files>
    </defaultDocument>    
        
    </system.webServer>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
            </dependentAssembly>
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
            </dependentAssembly>
        </assemblyBinding>
    </runtime>
 
    <!-- FOR URL REWRITER -->
      <rewriter>
        <rewrite url="~/about us" to="~/about-us.aspx" />
        <rewrite url="~/mission" to="~/mission.aspx" />
      </rewriter>
    <!-- FOR URL REWRITER -->
 
</configuration>


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>