K
krishna
Hi,
Hi,
I would like to handle the events for the dynamically
created controls at runtime.
I Have written the code in HTML View of an asp.net
page.like this
<script runat="server">
public sub hai(sender as object,e as eventargs)
Dim tr As New TableRow
Dim td1 As New TableCell
Dim Che As New CheckBox
Che.ID = "chkDynamicCheckBox"
Che.Text = "This is a dynamically generated
checkbox"
td1.Controls.Add(Che)
Dim td2 As New TableCell
Dim drop1 As New Button
drop1.Width = New Unit(50)
addhandler button.click,addressof hello
td1.Controls.Add(drop1)
tr.Cells.Add(td1)
tr.Cells.Add(td2)
Table3.Rows.Add(tr)
end sub
public sub hello(ByVal sender As Object, ByVal e As
System.EventArgs)
response.redirect("hello")
end sub
It is giving an error at this point
" addhandler button.click,addressof hello"
My aim is i have created a button drop1 at runtime when i
click this button it should give messge that "Hello"
Any one plz help me.
Regards,
Krishna.
Hi,
I would like to handle the events for the dynamically
created controls at runtime.
I Have written the code in HTML View of an asp.net
page.like this
<script runat="server">
public sub hai(sender as object,e as eventargs)
Dim tr As New TableRow
Dim td1 As New TableCell
Dim Che As New CheckBox
Che.ID = "chkDynamicCheckBox"
Che.Text = "This is a dynamically generated
checkbox"
td1.Controls.Add(Che)
Dim td2 As New TableCell
Dim drop1 As New Button
drop1.Width = New Unit(50)
addhandler button.click,addressof hello
td1.Controls.Add(drop1)
tr.Cells.Add(td1)
tr.Cells.Add(td2)
Table3.Rows.Add(tr)
end sub
public sub hello(ByVal sender As Object, ByVal e As
System.EventArgs)
response.redirect("hello")
end sub
It is giving an error at this point
" addhandler button.click,addressof hello"
My aim is i have created a button drop1 at runtime when i
click this button it should give messge that "Hello"
Any one plz help me.
Regards,
Krishna.