Professional Web Applications Themes

UserControl click event won't fire - ASP.NET Building Controls

I've got a custom usercontrol (UC1) that dynamically loads another custom usercontrols (UC2) during it's Init event. Both controls have LinkButtons with click events. The LinkButton from UC1 properly goes to it's click-event handler but the LinkButton from UC2 does not fire it's associated click event. Are there problem in having nested Usercontrols fire events if they're created through code? TIA...

  1. #1

    Default UserControl click event won't fire

    I've got a custom usercontrol (UC1) that dynamically loads another
    custom usercontrols (UC2) during it's Init event. Both controls have
    LinkButtons with click events. The LinkButton from UC1 properly goes
    to it's click-event handler but the LinkButton from UC2 does not fire
    it's associated click event.


    Are there problem in having nested Usercontrols fire events if they're
    created through code?

    TIA
    Mark Sisson Guest

  2. #2

    Default UserControl click event won't fire

    I've got a custom usercontrol (UC1) that dynamically loads another
    custom usercontrols (UC2) during it's Init event. Both controls have
    LinkButtons with click events. The LinkButton from UC1 properly goes
    to it's click-event handler but the LinkButton from UC2 does not fire
    it's associated click event.


    Are there problem in having nested Usercontrols fire events if they're
    created through code?

    TIA
    Mark Sisson Guest

  3. #3

    Default Re: UserControl click event won't fire

    I think you're experiencing the same problem as I am. The problem is that
    ASP.NET is unable to restore the viewstate of a dynamically loaded control
    after a postback. I'm searching for a way to do this manually now.

    Regards,

    Thijs

    "Mark Sisson" <markcorporatedigital.com> schreef in bericht
    news:88cc4eb9.0312020803.74f35a2cposting.google.c om...
    > I've got a custom usercontrol (UC1) that dynamically loads another
    > custom usercontrols (UC2) during it's Init event. Both controls have
    > LinkButtons with click events. The LinkButton from UC1 properly goes
    > to it's click-event handler but the LinkButton from UC2 does not fire
    > it's associated click event.
    >
    >
    > Are there problem in having nested Usercontrols fire events if they're
    > created through code?
    >
    > TIA

    Thijs Guest

Similar Threads

  1. double click causes click-event anddoubleClick-event
    By jpsouthern in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: April 14th, 09:27 PM
  2. dynamic loading - click event won't fire
    By CalSun in forum ASP.NET Building Controls
    Replies: 2
    Last Post: July 20th, 06:24 PM
  3. Event not firing in usercontrol inside usercontrol
    By vatech1993@yahoo.com in forum ASP.NET Building Controls
    Replies: 4
    Last Post: February 28th, 02:25 PM
  4. UserControl not capturing Button click event when loaded with PlaceHolder Control
    By Ralph Krausse in forum ASP.NET Building Controls
    Replies: 1
    Last Post: September 15th, 09:15 PM
  5. Replies: 2
    Last Post: May 28th, 06:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139