Solved

Ajax modal popup

Posted on 2008-06-16
4
1,005 Views
Last Modified: 2008-06-23
I have an ajax modal popup with a submit button on it, Everything was working fine but now when i click on it it does not fire the server side code. If i double click on the button in design mode it takes me to the code but it appears that the button is not post backing and yes the use submit behavior is true

Any ideas, what am i overlooking?
0
Comment
Question by:jimseiwert
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:ajitha75
ID: 21799410
can you post your code as well
0
 
LVL 2

Author Comment

by:jimseiwert
ID: 21804001

<%@ Master Language="VB" CodeFile="PCS.master.vb" Inherits="PCS" %>
 

<!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>Pricing Collaboration Suite</title>

    <link href="style.css" rel="stylesheet" type="text/css" />

    	<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">

		<meta name="CODE_LANGUAGE" Content="C#">

		<meta name="vs_defaultClientScript" content="JavaScript">

		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">

<script language="javascript" type="text/javascript">

<!--

// -->

</script>

</head>
 

<body class="page">

<form id="form1" runat="server">

    <div id="bodyWrap" style="text-align: center">

	<div class="pageWrapper" style="width: 1112px">

		<div id="header">

			<div id="heading" style="vertical-align: top">

							<div class="head"></div>

				<div class="sub">

					<asp:LinkButton ID="LinkButton1" runat="server">My Profile</asp:LinkButton>

					<asp:LoginStatus

                        ID="LoginStatus2" runat="server" />

				<div class="sub" >

                    <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">

                    </asp:Menu>

				</div>

				</div>

		</div>

	</div>

	<div class="pageWrapper" id="main" style="width: 1102px; text-align: left;">

		 <asp:ContentPlaceHolder ID="ContentPlaceHolder" runat="server">

                </asp:ContentPlaceHolder>

	

                    </div>
 
 

        © Copyright 2008 Nufarm Americas Inc.</div>     

            <asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" style="display:none" Width="354px">

                        <table style="width: 100%">

                            <tr>

                                <td style="width: 260px">

                                </td>

                                <td style="width: 100px">

                                </td>

                            </tr>

                            <tr>

                                <td style="width: 260px">

                                </td>

                                <td style="width: 100px">

                                </td>

                            </tr>

                            <tr>

                                <td style="width: 260px">

                                    <asp:Label ID="Label4" runat="server" Text="Name" Width="74px"></asp:Label></td>

                                <td style="width: 100px">

                                    <asp:Label ID="Label1" runat="server" Text="Label" Width="197px"></asp:Label></td>

                            </tr>

                            <tr>

                                <td style="width: 260px">

                                    <asp:Label ID="Label3" runat="server" Text="Last Log On" Width="74px"></asp:Label></td>

                                <td style="width: 100px">

                                    <asp:Label ID="Label2" runat="server" Text="Label" Width="197px"></asp:Label></td>

                            </tr>

                            <tr>

                                <td style="width: 260px; height: 16px">

                                    <asp:Label ID="Label8" runat="server" Text="Current Password" Width="98px"></asp:Label></td>

                                <td style="width: 100px; height: 16px">

                                    <asp:TextBox ID="TextBox3" runat="server" Width="189%" TextMode="Password"></asp:TextBox></td>

                            </tr>

                            <tr>

                                <td style="width: 260px">

                                    <asp:Label ID="Label5" runat="server" Text="New Password" Width="84px"></asp:Label></td>

                                <td style="width: 100px">

                                    <asp:TextBox ID="TextBox1" runat="server" Width="188%" TextMode="Password"></asp:TextBox></td>

                            </tr>

                            <tr>

                                <td style="width: 260px">

                                    <asp:Label ID="Label6" runat="server" Text="Confirm Password" Width="98px"></asp:Label></td>

                                <td style="width: 100px">

                                    <asp:TextBox ID="TextBox2" runat="server" Width="188%" TextMode="Password"></asp:TextBox></td>

                            </tr>

                            <tr>

                                <td style="width: 260px; height: 26px;">

                                </td>

                                <td style="width: 100px; height: 26px;">

                                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Save" /></td>

                            </tr>

                        </table>

                         <asp:LinkButton ID="LinkButton2" runat="server" CssClass="close" 

                            OnClientClick="$find('mastermdlPopup').hide(); return false;" />

                        <asp:Label ID="Label7" runat="server" ForeColor="Red"></asp:Label></asp:Panel>

                      

                       <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" BehaviorID="mastermdlPopup" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true">

        </ajaxToolkit:ModalPopupExtender>

          </form>

</body>

</html>

Open in new window

0
 
LVL 2

Author Comment

by:jimseiwert
ID: 21804011
server side code
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

        Me.Label7.Text = ""

        If Me.TextBox1.Text <> "" Then

            If Me.TextBox1.Text <> Me.TextBox2.Text Then

                Me.Label7.Text = "Passwords Do Not Match"

                Me.ModalPopupExtender1.Show()

                Exit Sub

            End If

            If main.changepassword(loginuser, Me.TextBox3.Text, Me.TextBox1.Text) = False Then

                Me.Label7.Text = "Invalid Current Password"

                Me.ModalPopupExtender1.Show()

                Exit Sub

            Else

                Me.ModalPopupExtender1.Hide()

            End If

        End If

    End Sub

Open in new window

0
 
LVL 14

Accepted Solution

by:
ajitha75 earned 500 total points
ID: 21805381
DropShadow="true" seems to be causing the problem, not sure why. You can instead use DropShadowExtender
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run time Error 4 35
Extracting last characters in a substring 5 21
Crystal reports vb.net 2 24
ASP.NET MVC 2 8
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now