Link to home
Create AccountLog in
Avatar of alivemedia
alivemedia

asked on

asp.net button doesn't fire event?

I click the button and nothing happens?  

Here's the url:
-------------------------
http://www.fidelityatm.com/DownloadBrochure.aspx

Here's the page code:
---------------------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="DownloadBrochure.aspx.vb" Inherits="DownloadBrochure" %>
<!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>Download Our Brochure - Fidelity ATM</title>
<link href="css/fidelityatm.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
<div id="container">
      <div id="header">
            <img src="images/temp-top-banner.jpg" width="765" height="244" border="0" usemap="#Map" />
        <map name="Map" id="Map">
          <area shape="rect" coords="14,193,114,230" href="business-opportunity.html" />
          <area shape="rect" coords="132,197,222,229" href="our-team.html" />
          <area shape="rect" coords="229,193,326,230" href="packages.html" />
          <area shape="rect" coords="339,194,412,232" href="service.html" />
          <area shape="rect" coords="426,195,542,232" href="starting-your-business.html" />
          <area shape="rect" coords="554,195,654,232" href="DownloadBrochure.aspx" alt="Download Brochure" />
          <area shape="rect" coords="7,24,141,111" href="index.html" alt="Fidelity ATM" />
          <area shape="rect" coords="670,191,747,234" href="pdf/Saturation_Survival_Guide.pdf" target="_blank" alt="Special Report" />
      </map>
  </div>
      <br />
      <div id="maincontent">
                  <div id="leftcol">
                          <img src="images/fidelity-atm-do-it.jpg" alt="The Opportunity Of Your Life!" width="257" height="282" />
                      <form name="form1" id="form2" method="post" action="contact-us.asp">
                              <label><img src="images/header-name.gif" alt="Name" width="44" height="11" /></label>      
                              <input name="Name" type="text" id="Name" />
                              <br />
                              <label><img src="images/header-email.gif" alt="E-Mail" width="44" height="12" /></label>
                              <input name="EmailAddress" type="text" id="EmailAddress" />
                              <br />
                              <label><img src="images/header-phone.gif" alt="Phone" width="47" height="12" /></label>
                              <input name="Phone" type="text" id="Phone" />
                              <br />
                              <label><img src="images/header-city.gif" alt="City" width="29" height="14" /></label>
                              <input name="City" type="text" id="City" />
                              <br />
                              <label><img src="images/header-state.gif" alt="State" width="37" height="12" /></label>
                              <input name="State" type="text" id="State" />
                              <br />
                          <label><img src="images/header-questions-comments.gif" alt="Questions / Comments" width="151" height="13" /></label>
                          <br />
                          <textarea name="Questions_Comments" id="Questions_Comments"></textarea>
                              <br />
                              <label></label> <input name="Submit" type="image" value="Submit" src="images/button-submit.gif" alt="Submit" class="submit" border="0" />
              </form>
        </div>
     
                  <div id="rightcol">
                    <p><img src="images/header-download-brochure.gif" height="31" alt="Download Brochure" /></p>
                     <asp:Panel ID="Panel1" runat="server">
                        <p>Please enter your password to download our brochure.</p>
                  <p><strong>Password:</strong>
                            <asp:TextBox ID="Password" runat="server"></asp:TextBox>
                            <asp:Button ID="Button1" runat="server" Text="Download Brochure" /></p>
                    <p><strong> <asp:Label ID="BadLogin" runat="server" Font-Bold="True" ForeColor="#C00000" Text="Invalid password, please try again or call 1-800-701-0845 to obtain one." Visible="False"></asp:Label></strong></p>
                 </asp:Panel>
                 <asp:Panel ID="Panel2" runat="server" Visible="false">
                    <p><strong>Thank You!</strong></p>
                    <p><a href="pdf/FidelityE-Brochure.pdf">Click here</a> to download our brochure.</p>
                  </asp:Panel>
               
                  </div>
      </div>
      <br/>
      <div id="footer">
                  <br />
                  <ul>
                        <li class="inline"><a href="index.html">Home</a></li>
                        <li class="inline"><a href="business-opportunity.html">Business Opportunity</a></li>
                        <li class="inline"><a href="our-team.html">Our Team</a></li>
                        <li class="inline"><a href="packages.html">Packages</a></li>            
                        <li class="inline"><a href="services.html">Services</a></li>              
                        <li class="inline"><a href="starting-your-business.html">Starting Your Business</a></li>                
                        <li class="last"><a href="DownloadBrochure.aspx">Download Brochure</a></li>
                  </ul>                  
              <p class="footer">
             Call us at: 800.701.0845   |  <a href="mailto:leads@fidelityatm.com">leads@fidelityatm.com</a> <br />
              All Content Copyright 2005 Fidelity ATM | advertising # B02483</p>
              <p class="footer" align="right"><a href="http://www.alivemedia.com/" target="_blank">Website design</a> and development by <a href="http://www.alivemedia.com/" target="_blank">AliveMedia, Inc.</a>&nbsp;&nbsp;&nbsp;<br /><br /></p>
      </div>
</div>
    </form>
</body>
</html>


Here is the vb.net code:
---------------------------
Partial Class DownloadBrochure
    Inherits System.Web.UI.Page

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Password.Text = "atmnow" Then
            Panel1.Visible = False
            Panel2.Visible = True
        Else
            BadLogin.Visible = True
        End If

    End Sub

End Class


I must be missing something simple?
ASKER CERTIFIED SOLUTION
Avatar of Raju Srivatsavaye
Raju Srivatsavaye
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of alivemedia
alivemedia

ASKER

Duh, see the other form on the page - that's the problem!