insert multiple row using single form
-
prateekfgiet wrote:
,i m new in asp.net
Then your task is kind of insane. Start slower. Learn how to lay out an ASP.NET project before worrying about databases. If you're new, I assume you're not doing paid work, or school work. If you were being paid, that would be immoral, basically theft. If it was for school, your tasks would be laid out more logically and you'd have spoken to your teacher. So, if you're teaching yourself, start simpler and build up to this task.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
prateekfgiet wrote:
,i m new in asp.net
Then your task is kind of insane. Start slower. Learn how to lay out an ASP.NET project before worrying about databases. If you're new, I assume you're not doing paid work, or school work. If you were being paid, that would be immoral, basically theft. If it was for school, your tasks would be laid out more logically and you'd have spoken to your teacher. So, if you're teaching yourself, start simpler and build up to this task.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
i am in job as a fresher and i have to complete this in any condition so pls help
-
i am in job as a fresher and i have to complete this in any condition so pls help
OK, so you ARE being asked to steal from a client ? Shame on you, and the people who hired you. However, people like you are the reason that outsourcing will die over time, and in the meantime, why the only clients it attracts, are idiots.
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
Hi Prateek, Create a XML string and use that XML string to insert values into table , (U have to do some googling to check building XML string and insert into DataBase table)
-
hey i have a solution!!!!!!!! Just save the values in Temporary datatable and after that run that temporary datatable in a loop and write the insert in it..... private void SaveGridDataInTempTable() { DataTable dtTemp = new DataTable(); if (dtTemp == null || dtTemp.Columns.Count <= 0) { dtTemp.Columns.Add("sino"); dtTemp.Columns.Add("name", typeof(String)); dtTemp.Columns.Add("gender", typeof(String)); dtTemp.Columns.Add("qualification", typeof(String)); dtTemp.PrimaryKey = new DataColumn[] { dtTemp.Columns["sino"] }; } foreach (GridViewRow gvRow in GridView1.Rows) { DataRow drTemp = dtTemp.NewRow(); drTemp["sino"] = int.Parse(GridView1.DataKeys[gvRow.RowIndex]["sino"].ToString()); drTemp["name"] = ((TextBox)gvRow.FindControl("TextBox1")).Text.Trim(); drTemp["gender"] = ((RadioButtonList)gvRow.FindControl("RadioButtonList1")).SelectedValue.ToString(); drTemp["qualification"] = ((DropDownList)gvRow.FindControl("DropDownList1")).SelectedValue.ToString(); dtTemp.Rows.Add(drTemp); } Temp = dtTemp; } //Property to maintain the Datatable public DataTable Temp { get { object o = ViewState["Temp"]; if (o == null) { DataTable dt = new DataTable(); return dt; } else return (DataTable)o; } set { ViewState["Temp"] = value; } } After this your normal insert code, for(int i=0;i