T
tshad
How do I get this event to fire without a code behind page. I want to have
this in one ASP.NET page (I know it may be cleaner with a codebehind).
I first tried this:
Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
and nothing happened. I then tried to had the "Handles" clause:
Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
and got an error:
Compiler Error Message: BC30506: Handles clause requires a WithEvents
variable.
How can I make this event fire in the same page?
Thanks,
Tom.
this in one ASP.NET page (I know it may be cleaner with a codebehind).
I first tried this:
Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs)
and nothing happened. I then tried to had the "Handles" clause:
Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
and got an error:
Compiler Error Message: BC30506: Handles clause requires a WithEvents
variable.
How can I make this event fire in the same page?
Thanks,
Tom.