468,278 Members | 1,582 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,278 developers. It's quick & easy.

Click events stop working!

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
Nov 18 '05 #1
2 1282

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 : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
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="XX***@XXXXXX.net"><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\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.
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Paolo Mancini | last post: by
reply views Thread by joe | last post: by
1 post views Thread by Waqas Pitafi | last post: by
4 posts views Thread by Rochdi | last post: by
5 posts views Thread by Richard Maher | last post: by
1 post views Thread by \Ji Zhou [MSFT]\ | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.