Click events stop working!

Discussion in 'ASP .Net' started by =?Utf-8?B?R0dX?=, May 20, 2004.

  1. 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
    =?Utf-8?B?R0dX?=, May 20, 2004
    1. Advertisements

  2. Natty Gur

    Natty Gur Guest


    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!
    Natty Gur, May 20, 2004
    1. Advertisements

  3. 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 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=""><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\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.
    =?Utf-8?B?Z2d3?=, May 20, 2004
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. joe

    stop multiple click events?

    joe, Aug 20, 2003, in forum: ASP .Net
  2. phoenix

    Why did my events stop working?

    phoenix, Nov 12, 2003, in forum: ASP .Net
  3. Ben Fidge
    S. Justin Gengo
    Jun 15, 2004
  4. lds
  5. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Aug 30, 2005

Share This Page