Consume Web API in ASPX Page using C# in ASP.Net

on Feb 08, 2018 11:14 PM


this code for select data from sql covert to xml and download works great.

now i am looking for the same way for insert and update methods so user can xml file in their directory and run insert and update using xml and xml file send the insert and update to database sql server please advice

protected void GenerateXML(object sender, EventArgs e)
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[1].ConnectionString);
    SqlDataAdapter dt = new SqlDataAdapter("SELECT * FROM Customers", con);
    DataSet ds = new DataSet();
    dt.Fill(ds, "Customers");
protected void DownloadXML(object sender, EventArgs e)
    if (System.IO.File.Exists(Server.MapPath("~/Customers.xml")))

I want an API which can take value of texbox and save in to sql server database.

Download FREE API for Word, Excel and PDF in ASP.Net: Download
on Feb 09, 2018 02:17 AM