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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Partha Sarathi31 reputationPosted Oct 7, 2015, 8:55 PM EDT
Priyaranjan K SRank #45 · 32.5K reputationPosted Oct 7, 2015, 9:34 PM EDT
anjali khanRank #4,788 · 325 reputationPosted Oct 8, 2015, 1:40 AM EDT
I want to display the data in list view in asp. Net without database..
After want iIupdate delete edit the data.. e
anjali khanRank #4,788 · 325 reputationPosted Oct 8, 2015, 1:40 AM EDT
I want to display the data in list view in asp. Net without database..
After want iIupdate delete edit the data.. e
anjali khanRank #4,788 · 325 reputationPosted Oct 9, 2015, 12:47 AM EDT
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;
}