DataSet DS = new DataSet("DS"); Business Obj_business = new Business(); DataTable Dt = new DataTable("DT"); Dt.Columns.Add("NAME", typeof(string)); foreach (RepeaterItem item in rptr_bulk.Items) { TextBox txt_insert = ((TextBox)item.FindControl("txt_insert")); Dt.Rows.Add(txt_insert.Text); } DS.Tables.Add(Dt); int status = Obj_business.InsertBulk(DS.GetXml()); if (status > 0) { Response.Write("Success"); Initialize_Repeater(); } else { Response.Write("Failed"); Initialize_Repeater(); }
SET NOCOUNT ON; declare @IDOC int exec sp_xml_preparedocument @IDOC output, @XML insert into Tbl_New(Name) select XName from openxml(@IDOC,'DS/DT',2) with ( XName nvarchar(50) 'NAME' ) exec sp_xml_removedocument @IDOC
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)