We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


asp.net button doesn't fire event?

alivemedia asked
Medium Priority
Last Modified: 2012-06-21
I click the button and nothing happens?  

Here's the url:

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" />
    <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" />
      <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" />
                  <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>
                            <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 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>
      <div id="footer">
                  <br />
                        <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>
              <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>

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
            BadLogin.Visible = True
        End If

    End Sub

End Class

I must be missing something simple?
Watch Question

Software Engineer
Dont see anything wrong..You might have probably done this ...but take the button control out..i mean delete..drag drop another button on to your panel..double-click it....so on..

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Duh, see the other form on the page - that's the problem!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.