Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Click events stop working!

Thread Tools

Click events stop working!

Posts: n/a
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
Reply With Quote
Natty Gur
Posts: n/a

Can you post the content of your base page or sample project to
natty-at-dao2com-dot-com? it is hard to know from what you post by now.

Natty Gur[MVP]

blog :
Mobile: +972-(0)58-888377

*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Reply With Quote
Posts: n/a
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 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="" method="post"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="business" value="(E-Mail Removed)"><input type="hidden" name="display" value="1"><input type="image" src="" 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\ControlImag es\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.
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
click click click Andy Morrison Computer Support 7 12-20-2007 06:50 AM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
Button Click events only firing on second click Ben Fidge ASP .Net 5 06-15-2004 02:28 PM
Q. My browser doesn't stop, when I click on STOP. Jim Jones Computer Support 7 02-03-2004 09:47 PM
stop multiple click events? joe ASP .Net 0 08-20-2003 04:03 PM