R
rn5a
Can System.EventArgs be cast to CommandEventArgs? If so, how?
Actually I want the Page_Load sub to invoke another sub which is the
OnCommand event handler of a LinkButton.
<script runat="server">
Sub Page_Load(obj As Object, ea As EventArgs)
CallCmd(obj, ??)
End Sub
Sub CallCmd(obj As Object, ea As CommandEventArgs)
..........
..........
End Sub
</script>
<form runat="server">
<asp:LinkButton ID="lnkButton" OnCommand="CallCmd" Text="ABCD"
runat="server"/>
</form>
For the Page_Load sub to invoke CallCmd, the second parameter should be
of type CommandEventArgs. How do I cast EventArgs to CommandEventArgs?
Actually I want the Page_Load sub to invoke another sub which is the
OnCommand event handler of a LinkButton.
<script runat="server">
Sub Page_Load(obj As Object, ea As EventArgs)
CallCmd(obj, ??)
End Sub
Sub CallCmd(obj As Object, ea As CommandEventArgs)
..........
..........
End Sub
</script>
<form runat="server">
<asp:LinkButton ID="lnkButton" OnCommand="CallCmd" Text="ABCD"
runat="server"/>
</form>
For the Page_Load sub to invoke CallCmd, the second parameter should be
of type CommandEventArgs. How do I cast EventArgs to CommandEventArgs?