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-banne r.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-busine ss.html" />
<area shape="rect" coords="554,195,654,232" href="DownloadBrochure.asp x" 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_Survi val_Guide. pdf" target="_blank" alt="Special Report" />
</map>
</div>
<br />
<div id="maincontent">
<div id="leftcol">
<img src="images/fidelity-atm-d o-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.gi f" alt="Name" width="44" height="11" /></label>
<input name="Name" type="text" id="Name" />
<br />
<label><img src="images/header-email.g if" alt="E-Mail" width="44" height="12" /></label>
<input name="EmailAddress" type="text" id="EmailAddress" />
<br />
<label><img src="images/header-phone.g if" alt="Phone" width="47" height="12" /></label>
<input name="Phone" type="text" id="Phone" />
<br />
<label><img src="images/header-city.gi f" alt="City" width="29" height="14" /></label>
<input name="City" type="text" id="City" />
<br />
<label><img src="images/header-state.g if" alt="State" width="37" height="12" /></label>
<input name="State" type="text" id="State" />
<br />
<label><img src="images/header-questio ns-comment s.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-downloa d-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:</stro ng>
<asp:TextBox ID="Password" runat="server"></asp:TextB ox>
<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:Labe l></strong ></p>
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" Visible="false">
<p><strong>Thank You!</strong></p>
<p><a href="pdf/FidelityE-Brochu re.pdf">Cl ick 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">Bus iness Opportunity</a></li>
<li class="inline"><a href="our-team.html">Our Team</a></li>
<li class="inline"><a href="packages.html">Packa ges</a></l i>
<li class="inline"><a href="services.html">Servi ces</a></l i>
<li class="inline"><a href="starting-your-busine ss.html">S tarting Your Business</a></li>
<li class="last"><a href="DownloadBrochure.asp x">Downloa d Brochure</a></li>
</ul>
<p class="footer">
Call us at: 800.701.0845 | <a href="mailto:leads@fidelit yatm.com"> leads@fide lityatm.co m</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> <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?
Here's the url:
-------------------------
http://www.fidelityatm.com/DownloadBrochure.aspx
Here's the page code:
--------------------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="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"
</head>
<body>
<form id="form1" runat="server">
<div id="container">
<div id="header">
<img src="images/temp-top-banne
<map name="Map" id="Map">
<area shape="rect" coords="14,193,114,230" href="business-opportunity
<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-busine
<area shape="rect" coords="554,195,654,232" href="DownloadBrochure.asp
<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_Survi
</map>
</div>
<br />
<div id="maincontent">
<div id="leftcol">
<img src="images/fidelity-atm-d
<form name="form1" id="form2" method="post" action="contact-us.asp">
<label><img src="images/header-name.gi
<input name="Name" type="text" id="Name" />
<br />
<label><img src="images/header-email.g
<input name="EmailAddress" type="text" id="EmailAddress" />
<br />
<label><img src="images/header-phone.g
<input name="Phone" type="text" id="Phone" />
<br />
<label><img src="images/header-city.gi
<input name="City" type="text" id="City" />
<br />
<label><img src="images/header-state.g
<input name="State" type="text" id="State" />
<br />
<label><img src="images/header-questio
<br />
<textarea name="Questions_Comments" id="Questions_Comments"></
<br />
<label></label> <input name="Submit" type="image" value="Submit" src="images/button-submit.
</form>
</div>
<div id="rightcol">
<p><img src="images/header-downloa
<asp:Panel ID="Panel1" runat="server">
<p>Please enter your password to download our brochure.</p>
<p><strong>Password:</stro
<asp:TextBox ID="Password" runat="server"></asp:TextB
<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:Labe
</asp:Panel>
<asp:Panel ID="Panel2" runat="server" Visible="false">
<p><strong>Thank You!</strong></p>
<p><a href="pdf/FidelityE-Brochu
</asp:Panel>
</div>
</div>
<br/>
<div id="footer">
<br />
<ul>
<li class="inline"><a href="index.html">Home</a>
<li class="inline"><a href="business-opportunity
<li class="inline"><a href="our-team.html">Our Team</a></li>
<li class="inline"><a href="packages.html">Packa
<li class="inline"><a href="services.html">Servi
<li class="inline"><a href="starting-your-busine
<li class="last"><a href="DownloadBrochure.asp
</ul>
<p class="footer">
Call us at: 800.701.0845 | <a href="mailto:leads@fidelit
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
</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
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER