Ok, here is my code.
asp Code:
<asp:DataGrid runat="server" ID = "testgrid" OnSelectedIndexChanged="testgrid_SelectedIndexChanged" OnItemCommand="Button_Click" Height="40px"> <HeaderStyle BackColor="Blue" ForeColor = "White"/> <Columns > <asp:ButtonColumn Text = "View Information" ButtonType="PushButton" ></asp:ButtonColumn> </Columns> </asp:DataGrid>
And in the codebehind I have:
asp.net Code:
void Button_Click(System.Object Sender, System.Web.UI.WebControls.DataGridCommandEventArgs e) { MessageBox("Button Pushed!"); }
Now, when I compile, I'm getting this error:
Error 3 'newpage.Button_Click(object, System.Web.UI.WebControls.DataGridCommandEventArgs)' is inaccessible due to its protection level C:\Documents and Settings\justin\My Documents\Visual Studio 2005\WebSites\AceSite\newpage.aspx 62
I'm kinda stuck...
Thanks for the help,
Justin Fox




Reply With Quote