protected void ListView1_ItemDeleting(object sender, ListViewDeleteEventArgs e)
{
// ListViewItem item = ListView1.Items[e.ItemIndex];
ListViewItem itm = ListView1.Items[e.ItemIndex];
// ListViewItemType gd = ListView1.Rows[e.RowIndex];
//ListViewItem gd = ListView1.SelectedIndex ;
// string tem = ((LinkButton)gd.FindControl("lbldel")).CommandArgument.ToString();
LinkButton hfEmployeeID = (LinkButton)itm.FindControl("lbldel");
mml.Insert("delete from section where sectionid='" + hfEmployeeID.value + "'");
BindGrid();
// details();
}
protected void ListView1_ItemCommand(object sender, ListViewCommandEventArgs e)
{
if (e.CommandName == "Delete")
{
}
// {
// if (e.CommandName == "Delete")
//{
// Label TextBoxVendorId = (Label)e.Item.FindControl("LinkButton1");
// string deleteCommand = "delete from section where sectionid=" + Convert.ToInt32(TextBoxVendorId.Text);
////SqlDataSource1.DeleteCommand = deleteCommand;
//}
}
error is
Server Error in '/Riyaz Asp' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1061: 'System.Web.UI.WebControls.LinkButton' does not contain a definition for 'value' and no extension method 'value' accepting a first argument of type 'System.Web.UI.WebControls.LinkButton' could be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 126: // string tem = ((LinkButton)gd.FindControl("lbldel")).CommandArgument.ToString();
Line 127: LinkButton hfEmployeeID = (LinkButton)itm.FindControl("lbldel");
Line 128: mml.Insert("delete from section where sectionid='" + hfEmployeeID.value + "'");
Line 129: BindGrid();
Line 130: // details();
Source File: d:\Riyaz Asp\Master\Section.aspx.cs Line: 128
Show Detailed Compiler Output:
Show Complete Compilation Source:
Version Information: Microsoft .NET Framework Version:2.0.50727.4984; ASP.NET Version:2.0.50727.4971