how to edit update delete the data in listview without using data base in asp.net?
i want to use listview onlyyy..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
anjali khanPosted Oct 9, 2015, 4:47 AM
OnSelectedIndexChanged="lvCustomers_SelectedIndexChanged1"
OnItemCanceling="lvCustomers_ItemCanceling"
onitemupdating="lvCustomers_ItemUpdating"
onitemdatabound="lvCustomers_ItemDataBound">
Name
Country
<%# Eval("Name") %>
<%# Eval("Country") %>
Name:
Country:
<%--
{
DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
DataTable dt = new DataTable();
dt.Columns.AddRange(new DataColumn[2] { new DataColumn("Name"), new DataColumn("Country") });
ViewState["Customers"] = dt;
this.BindGrid();
}
}
protected void BindGrid()
{
lvCustomers.DataSource = (DataTable)ViewState["Customers"];
lvCustomers.DataBind();
}
protected void Insert(object sender, EventArgs e)
{
DataTable dt = (DataTable)ViewState["Customers"];
dt.Rows.Add(txtName.Text.Trim(), txtCountry.Text.Trim());
ViewState["Customers"] = dt;
this.BindGrid();
txtName.Text = string.Empty;
txtCountry.Text = string.Empty;
}
anjali khanPosted Oct 8, 2015, 5:40 AM
I want to display the data in list view in asp. Net without database..
After want iIupdate delete edit the data.. e
anjali khanPosted Oct 8, 2015, 5:40 AM
I want to display the data in list view in asp. Net without database..
After want iIupdate delete edit the data.. e
Priyaranjan K SPosted Oct 8, 2015, 1:34 AM
Partha SarathiPosted Oct 8, 2015, 12:55 AM