Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Click event not firing with custom control

Reply
Thread Tools

Click event not firing with custom control

 
 
Zane
Guest
Posts: n/a
 
      10-30-2003
Hi all,

I have created a custom control library in Visual
Studio .NET 2003 using .NET framework 1.1 on Server 2003.

The problem is when I promatically add a click event to a
button within a custom web control it won't work unless
it has a property attached to the class (IE like text for
the button and that also the property is using the method
EnsureChildControl()).

When you go to internet explorer and click the button it
doesn't work. But it you have the property in there with
the EnsureChildControl method it works.

This isn't one off thing either, as it has happened to me
many times with other configurations. Is this a bug??
Because I'm ready to destroy the PC.

Any ideas??

thanks

Zane
 
Reply With Quote
 
 
 
 
Tim T
Guest
Posts: n/a
 
      10-30-2003
I think i'm having the same problem
hopefully someone will respond to my most recent post with good answers

Tim T

"Zane" <(E-Mail Removed)> wrote in message
news:07c501c39e8e$e97528e0$(E-Mail Removed)...
> Hi all,
>
> I have created a custom control library in Visual
> Studio .NET 2003 using .NET framework 1.1 on Server 2003.
>
> The problem is when I promatically add a click event to a
> button within a custom web control it won't work unless
> it has a property attached to the class (IE like text for
> the button and that also the property is using the method
> EnsureChildControl()).
>
> When you go to internet explorer and click the button it
> doesn't work. But it you have the property in there with
> the EnsureChildControl method it works.
>
> This isn't one off thing either, as it has happened to me
> many times with other configurations. Is this a bug??
> Because I'm ready to destroy the PC.
>
> Any ideas??
>
> thanks
>
> Zane



 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      10-30-2003
A work around I use now is to create a string that is
empty and assign a property to the class using it. This
way it ensure the control click events work and it doen't
interfere with the controls logic. Unfortunatly you will
have a control with an extra property that doesn't do
anything.

Zane


>-----Original Message-----
>I think i'm having the same problem
>hopefully someone will respond to my most recent post

with good answers
>
>Tim T
>
>"Zane" <(E-Mail Removed)> wrote in

message
>news:07c501c39e8e$e97528e0$(E-Mail Removed)...
>> Hi all,
>>
>> I have created a custom control library in Visual
>> Studio .NET 2003 using .NET framework 1.1 on Server

2003.
>>
>> The problem is when I promatically add a click event

to a
>> button within a custom web control it won't work unless
>> it has a property attached to the class (IE like text

for
>> the button and that also the property is using the

method
>> EnsureChildControl()).
>>
>> When you go to internet explorer and click the button

it
>> doesn't work. But it you have the property in there

with
>> the EnsureChildControl method it works.
>>
>> This isn't one off thing either, as it has happened to

me
>> many times with other configurations. Is this a bug??
>> Because I'm ready to destroy the PC.
>>
>> Any ideas??
>>
>> thanks
>>
>> Zane

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

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
firing button click event before page load event.....???? GauravGupta ASP .Net 4 01-19-2012 06:52 AM
Event handler not firing in custom control Shannon Cayze ASP .Net 2 04-22-2010 01:30 PM
User Control Button Click event not firing when placed in a Web form ~~~ .NET Ed ~~~ ASP .Net 3 09-08-2008 05:36 AM
Custom GridView with Button - Click Event Not Firing ADN ASP .Net 0 04-22-2008 01:32 PM
Custom Control Click Event not firing. irislogic_1 ASP .Net Web Controls 2 01-09-2005 08:54 AM



Advertisments