Click events stop working!

G

Guest

Hi,
I am building a Ecommerce site using usercontrols. I built a search control that uses the Ontextchaged event.
The control was place manually on the page- not dynamiclly. All was working fine then it just stopped working.
So I tried placing a simple button on the form & same result - no go.
I do have other user controls that contain webmenues & such and they fire, even have Pay Pal shopping cart that works fine.
but when I go to place a button on the page no fire. I'v been searching for the answer for a couple of days & have tried numerous fixes with no luck.
Here is a bit of what I'm up to. Hope somebody can help with this.

<form id="Form1" method="post" runat="server"><asp:Button id="Button1" runat="server" Text="Button" OnClick="Button1_Click" ></asp:Button></form>

Imports System
Imports System.Web.UI.WebControls

Public Class Index
'Inherits System.Web.UI.Page
Inherits BasePage


Protected WithEvents Table1 As System.Web.UI.WebControls.Table
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents pageContentsCell As System.Web.UI.WebControls.TableCell

Public Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
'Response.Redirect("home.aspx?Search=" + txtSearch.Text + _
' "&AllWords=" + cxbxallwords.Checked.ToString())
End Sub

I thank you in advance of your efforts
 
G

Guest

Hi
thanks for responding - I discovered the problem - the BasePage is irrelevant as it is basically there to provide consistant error logging

The problem is/was this: When I put the following PayPal code into an asp.net form or table or html Table almost all other events would be deactivated excepting the WebMenue controls were still active. As soon as I put the PayPal code outside the ASP.Net Form all is well. -- I would like to know why this happens! The code is a View Shopping Cart bit from PayPal
The "Add to cart" bit of code is very similar but does not have the same affect

<table width="100%" bgcolor="white" border="0" cellpadding="3" cellspacing="3"><tr align="center" valign="top"><td width="171" align="left"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="business" value="(e-mail address removed)"><input type="hidden" name="display" value="1"><input type="image" src="https://www.paypal.com/en_US/i/btn/view_cart.gif" border="0" name="submit
alt="Make payments with PayPal - it's fast, free and secure!"></form></td><td align="left" valign="top"><IMG alt="" src="file:///C:\Inetpub\wwwroot\XXXXXX\UserControls\ControlImages\XXXXX.jpg"></td></tr></table

It seems a bit strange to me & would be really interested in discovering why this happens

Thanks again in advance for your efforts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top