473,378 Members | 1,594 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,378 software developers and data experts.

Dynamic controls and event wiring

To wire a Click event handler to a dynamically-added control (e.g.
LinkButton), you need to do so during the Load event of the parent (e.g. a
PlaceHolder).

The problem is, the Click event handler sets up a member variable that needs
to control how the dymanic controls are created in the first place!

Alas, I can't do so because it's already too late since the Load event fires
before the Click event.

Wiring the Click event handler during the PreRender event of the parent
doesn't work.

I played around with the idea of using positional static controls and
dynamically setting their Visible and Enabled properties, but it turned out
quite messy.

Is there a way to work around this problem.

I appreciate your feedback.
Nov 19 '05 #1
0 1110

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

Similar topics

1
by: Bill | last post by:
I'm trying to dynamically build several linkbuttons and wire them up to a method called OnLinkClick . . . For the life of me, I don't understand why the code below isn't firing the event. ...
2
by: MacKenzieMouse | last post by:
I have been struggling with creating dynamic tables populated with rows and cells the top row has one cell with a label the next row has four cells with a label each the last row has 4 cells...
2
by: Juan Romero | last post by:
Hey guys, I am working on a web custom control that basically draws a table (ASP Table) with a few child controls in the cells. I have a command button inside one of these cells. The problem I...
1
by: andrei | last post by:
Hi Group, I have an aspx form with a variable number of buttons added dynamically, with id's like b01, b02, b03... Whenever I click one of these buttons, the form is posted back. I need to...
3
by: WebBuilder451 | last post by:
I have a series of dynamic link buttons created based upon a datareader. I've added a click event and it calls the sub ok: example: "while loop through the reader" Dim ltrCtrl As New...
6
by: Andrew Robinson | last post by:
I have a page that contains a number of link buttons that are used for making selections. I load my LinkButtons during the Page_PreInit event and they render fine but then I need to make a change...
9
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have...
4
by: brett | last post by:
I load a dynamic control once a button is clicked. In the control is another button. However, I can't get its click event to fire. Here's the pattern: Page1.aspx ---------...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.