Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Button Click Event into dynamic UserControl

Reply
Thread Tools

Button Click Event into dynamic UserControl

 
 
Luca
Guest
Posts: n/a
 
      03-25-2005
HI,
I've a asp.net application that add a dynamic usercontrol with a
button. If i've tried to click it Click Event don't load.
But into a static usercontrol it's happens.
Anyone can help me?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?SWFuIFN1dHRsZQ==?=
Guest
Posts: n/a
 
      03-25-2005
Luca,

Make sure you are reloading the user control on the post back. Also, at
won't point do you dynamically load it?

Ian Suttle
http://www.IanSuttle.com

"Luca" wrote:

> HI,
> I've a asp.net application that add a dynamic usercontrol with a
> button. If i've tried to click it Click Event don't load.
> But into a static usercontrol it's happens.
> Anyone can help me?
>

 
Reply With Quote
 
 
 
 
Johan
Guest
Posts: n/a
 
      03-26-2005
If you add a new button make sure to register a event-handling method for
the click event.

Button1.Command += new CommandEventHandler(this.visa_click);

/Johan


 
Reply With Quote
 
Luca
Guest
Posts: n/a
 
      03-29-2005
i seen this scenario...
if i add usercontrol on page load sub, the event method of button work
fine.
But into my application the usercontrol display same information that
i have only after i have same information from database.
There's a method where could i modify a literal into usercontrol added
into page load????

Best Rgds
Luca

"Johan" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> If you add a new button make sure to register a event-handling method for
> the click event.
>
> Button1.Command += new CommandEventHandler(this.visa_click);
>
> /Johan

 
Reply With Quote
 
Jc Morin
Guest
Posts: n/a
 
      03-29-2005
Hi Johan

Any html can be customized from code-behind, just make it part of a html
know control such as <span> or <label>, and an id, runat="server" and you
can change it's value in the page load if you want.

--------------------------
Jean-Claude Morin, MCP
Software Developer
2k1Soft/kCentric, Canada


"Luca" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> i seen this scenario...
> if i add usercontrol on page load sub, the event method of button work
> fine.
> But into my application the usercontrol display same information that
> i have only after i have same information from database.
> There's a method where could i modify a literal into usercontrol added
> into page load????
>
> Best Rgds
> Luca
>
> "Johan" <(E-Mail Removed)> wrote in message

news:<(E-Mail Removed)>...
> > If you add a new button make sure to register a event-handling method

for
> > the click event.
> >
> > Button1.Command += new CommandEventHandler(this.visa_click);
> >
> > /Johan



 
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
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Web Controls 0 05-25-2004 01:45 AM



Advertisments