473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Button Click Event into dynamic UserControl

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?
Nov 19 '05 #1
4 2194
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?

Nov 19 '05 #2
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
Nov 19 '05 #3
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" <s9******@hotmail.com> wrote in message news:<3a*************@individual.net>...
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

Nov 19 '05 #4
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" <pr****@libero.it> wrote in message
news:3d**************************@posting.google.c 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" <s9******@hotmail.com> wrote in message

news:<3a*************@individual.net>...
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

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Scott Schade | last post by:
I have a form onto which I add a control during execution. The control is a control that I wrote. The control has a number of controls on it. I would like to click on a button on the control and...
4
by: athlonman | last post by:
Hi all!! II'm trying to set the Text of a TextBox in "Form1" when I click a Button in a UserControl. My code is: : public class Form1 : System.Windows.Forms.Form { public...
1
by: Todd Acheson | last post by:
Attention all Guru's, Let's say I create a control at runtime similar to this: 'this is one button within a loop that creates many buttons Dim ctl as New System.Web.UI.WebControls.Button...
0
by: Pingo | last post by:
Hi! How do I handle a Page event in my UserControl. My .aspx page contain 5 different buttons and one of them is the SAVE button. All buttons do PostBack to the page but only one should Save...
0
by: davidr | last post by:
Hi, I've read about bubble events and setting up the event args and several other methods to have an event that occurs in a usercontrol flow up to the parent. The problem is each one entails a...
4
by: xkeops | last post by:
I'm working in VS2003 VB.NET environment. I created a based class template (BasePage) and there is a new aspx win form (winform1.aspx) inheriting BasePage. In winform1.aspx I have added a new...
3
by: pearcewg | last post by:
All: I have a page with a form and fields on the form (checkboxes, grids, etc). This form contains a usercontrol which has a dynamic navigational menu of buttons. When a user clicks on one of...
0
by: spothineni | last post by:
Hi Guys, Today i am facing problem with dynamic controls.Thing is I have a dropdown combo which is having list.i have button and UserControl. when i select dropdown value and click on...
7
by: =?Utf-8?B?bWFydGluMQ==?= | last post by:
Hi, All, I create button in the code ( Dim Button as new Button), not using button web component (means not drap button and drop it ont he webform), after that I try to use button_click event,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.