Ask a Question related to ASP.NET General, Design and Development.
-
Boban Dragojlovic #1
Dynamic Buttons and Event Handlers, revisited
The Concept:
I dynamically create an HTML table (with many rows) each with its own
button. When the user clicks on the button, I wan't to know which row's
button they clicked.
The Details:
On the initial pass through a page (e.g. when NOT Page.isPostBack) I read a
SQL table, and for each row in the table I create a dynamic row in an HTML
table, including a button. I also assign an event handler for the new
button
b = New Button
b.Text = "Select"
b.ID = "btnSelect" & iCount
AddHandler b.Click, AddressOf SelectRow
I also record how many buttons I created in the ViewState.
When the page is posted back (within Page_Init), I recreate the buttons,
including the event handler, as follows:
For i = 1 To CInt(ViewState("nbrButtons"))
b = New Button
b.ID = "btnSelect" & i
AddHandler b.Click, AddressOf SelectRow
Next i
Yet in spite of this, I can never get the SelectRow event handler to fire.
Boban Dragojlovic Guest
-
Dynamic Dependant Select Revisited
This code works fairly well, so I wanted to share it. It does have one small problem that I was wondering if someone could help me with. ... -
Missing Event Handlers
I created a custom control derived from DataGrid. It work well, but I have the following problem: Sometimes, the event handlers that are declared... -
loadMovie() and Dynamic Event Handlers !!HELP!!
This code place images on the screen. Actually it places an empty movie clip on the stage then fills each with an image. The image that is loaded... -
event handlers
Does anyone know how to cause the cursor to advance to the next field on a form after the first field has been filled? -
Staggered buttons -- revisited
On 8/18/2003 9:04 AM, "BradleyMiller" webforumsuser@macromedia.com wrote: What you need to do is export differently. Open Dreamweaver and add a 1...



Reply With Quote

