how can i create xml data abd how can i update delete and insert..
-
hi everyone ..i m working on one zoo project ..so i need some information .. i want 2 create xml file as a database and i want 2 insert data ,delete data,and update .. in xml database plzz can any one tell how it ll do?? in using C# code..
thanks 2 all..
-
hi everyone ..i m working on one zoo project ..so i need some information .. i want 2 create xml file as a database and i want 2 insert data ,delete data,and update .. in xml database plzz can any one tell how it ll do?? in using C# code..
thanks 2 all..
-
Insert and delete are pretty simple methods. U just need to access proper node with the help of Xpath query. Post ur specific question if u have any...
can u provide insert and delete code..plz...
thanks 2 all..
-
can u provide insert and delete code..plz...
thanks 2 all..
Read the documentation, write your code and, then, ask for help on a specific problem. I provided some links below to get you started: http://msdn2.microsoft.com/en-us/library/0h7a3akd(VS.80).aspx[^] http://msdn2.microsoft.com/en-us/library/etdhs5bz(VS.80).aspx[^] http://msdn2.microsoft.com/en-us/library/1w7dc16f(VS.80).aspx[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
Read the documentation, write your code and, then, ask for help on a specific problem. I provided some links below to get you started: http://msdn2.microsoft.com/en-us/library/0h7a3akd(VS.80).aspx[^] http://msdn2.microsoft.com/en-us/library/etdhs5bz(VS.80).aspx[^] http://msdn2.microsoft.com/en-us/library/1w7dc16f(VS.80).aspx[^]
"We make a living by what we get, we make a life by what we give." --Winston Churchill
Check This Out...It will work out... :) Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating Dim i As Integer = GridView1.Rows(e.RowIndex).DataItemIndex Dim strId As String = CType(GridView1.Rows(e.RowIndex).Cells(2).Controls(0), TextBox).Text Dim strName As String = CType(GridView1.Rows(e.RowIndex).Cells(3).Controls(0), TextBox).Text GridView1.EditIndex = -1 BindGrid() ' Update the XML file using the new values Dim oDs As Data.DataSet = GridView1.DataSource oDs.Tables(0).Rows(i).Item(0) = strId oDs.Tables(0).Rows(i).Item(1) = strName oDs.WriteXml(Request.PhysicalApplicationPath + "books.xml") BindGrid() End Sub Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting BindGrid() Dim oDs As Data.DataSet = GridView1.DataSource oDs.Tables(0).Rows(GridView1.Rows(e.RowIndex).DataItemIndex).Delete() oDs.WriteXml(Request.PhysicalApplicationPath + "books.xml") BindGrid() End Sub Protected Sub GridView1_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView1.RowCancelingEdit GridView1.EditIndex = -1 BindGrid() End Sub Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing GridView1.EditIndex = e.NewEditIndex BindGrid() End Sub Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging GridView1.PageIndex = e.NewPageIndex BindGrid() End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Page.IsPostBack = False Then BindGrid() End If End Sub Sub BindGrid() Dim oDs As New Data.DataSet oDs.ReadXml(Request.PhysicalApplicationPath + "books.xml") GridView1.DataSource = oDs GridView1.DataBind() End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click If txtId.Text = "" Or txtName.Text = "" Then MsgBox("