locked
click event not firing RRS feed

  • Question

  • User-83762437 posted

     OS: MS Server 2003

    Visual studio 2005

    I had a button on a page that worked at one time and all of a sudden stopped working.

    <%@ Page Language="VB" MasterPageFile="~/Site.master" 
        AutoEventWireup="false" 
        CodeFile="Default.aspx.vb" 
        Inherits="Forms_Departments_Default" 
        title="Departments View" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" 
        Runat="Server">
         
        <asp:Button ID="Deselect_dept" runat="server" Text="Deselect all" CssClass="ButtonStyle" />
        <asp:Button ID="Delete" runat="server" 
            Text="Delete Selected Departments" 
            CssClass="ButtonStyle" Width="205px" 
            OnClientClick="return confirm('Are you certain you want to delete the selected department(s)?');"/>
        <br />
    
    .
    .
    
    The code for the button; "Delete" works fine.
    The code for the button; "Delete_dept" isn't firing at all. This is the codebehind...
     
        Protected Sub Deselect_dept_Click( _
            ByVal sender As Object, _
            ByVal e As System.EventArgs) Handles Deselect_dept.Click
    
            ToggleCheckState(False)
    
        End Sub

    I can place a debug break-point anywhere in this code. It's getting there at all. It's driving me nuts!
     
    
    


     

    Monday, September 21, 2009 4:41 PM

Answers

  • User1330954201 posted

     Try inserting the following into the Deselect_dept button markup :-

    OnClick="Deselect_dept_Click"

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 22, 2009 3:38 AM

All replies

  • User1824672581 posted

    set the z-index values and hope this should be taken care..

     

    Monday, September 21, 2009 7:04 PM
  • User1330954201 posted

     Try inserting the following into the Deselect_dept button markup :-

    OnClick="Deselect_dept_Click"

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, September 22, 2009 3:38 AM
  • User-83762437 posted

     Setting the OnClick value worked. Now the question is; Why is this even necessary? My impression is that you use it if you want to do some java-script like alerts. I've never needed to set that value to just fire off it's code-behind event.

    Re: "Z-Index"? What's that? Where do I find it? I see a Tab-Index property, but no Z-Index.

    Thanks,

    mcj

    Tuesday, September 22, 2009 6:58 AM