G
Guest
Can someone please tell me how I get around this problem! I want to send a
querystring to a page so the user can edit the page info... I tried to use an
onClick event but I keep getting the following error...
Thanks for any help!
Compiler Error Message: BC30408: Method 'Public Sub
LinkButton_OnClick(sender As Object, e As
System.Web.UI.WebControls.DataGridCommandEventArgs)' does not have the same
signature as delegate 'Delegate Sub EventHandler(sender As Object, e As
System.EventArgs)'.
...Codebehind..
Sub LinkButton_OnClick(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs)
Dim PageEdit As LinkButton = CType(e.Item.FindControl("PageEdit"),
LinkButton)
PageEdit.Attributes("onclick") = "'default.aspx?id=" & 1 & "'"
End Sub
Inline Code..
<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:LinkButton onclick="LinkButton_OnClick" Text="<img border=0
src=../images/edit.gif alt='Edit Page'>" ID="PageEdit" Runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateColumn>
querystring to a page so the user can edit the page info... I tried to use an
onClick event but I keep getting the following error...
Thanks for any help!
Compiler Error Message: BC30408: Method 'Public Sub
LinkButton_OnClick(sender As Object, e As
System.Web.UI.WebControls.DataGridCommandEventArgs)' does not have the same
signature as delegate 'Delegate Sub EventHandler(sender As Object, e As
System.EventArgs)'.
...Codebehind..
Sub LinkButton_OnClick(ByVal sender As Object, ByVal e As
DataGridCommandEventArgs)
Dim PageEdit As LinkButton = CType(e.Item.FindControl("PageEdit"),
LinkButton)
PageEdit.Attributes("onclick") = "'default.aspx?id=" & 1 & "'"
End Sub
Inline Code..
<asp:TemplateColumn>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<ItemTemplate>
<asp:LinkButton onclick="LinkButton_OnClick" Text="<img border=0
src=../images/edit.gif alt='Edit Page'>" ID="PageEdit" Runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center"></ItemStyle>
</asp:TemplateColumn>