TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
pradeep kumar
NA
94
67.1k
Datatable to XML
Oct 12 2012 5:17 AM
I have a grid that contains name,value and value is text box.
submit button is outside the grid.
on the click of submit button the grid values should save as xml data in database..,
need urgent solution...,
private DataTable CreateDatatable()
{
DataTable dt = new DataTable();
dt.Columns.Add("Boundary_Id");
dt.Columns.Add("Boundary_Name1");
dt.Columns.Add("Boundary_Name2");
dt.Columns.Add("Boundary_Value");
dt.Columns.Add("Status");
DataRow dr = dt.NewRow();
dr["Boundary_Id"].ToString();
dr["Boundary_Name1"].ToString();
dr["Boundary_Name2"].ToString();
dr["Boundary_Value"].ToString();
dr["Status"].ToString();
dt.Rows.Add(dr);
return dt;
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
try
{
BoundaryMapping objBoundmap = new BoundaryMapping();
objBoundmap.Boundary_Name1 = ddlbcon.SelectedValue;
foreach (GridDataItem item in gvboundarymap.MasterTableView.Items)
{
if (item is GridDataItem)
{
TextBox txtbvalue = (TextBox)item.FindControl("txtbvalue");
objBoundmap.Boundary_Value = txtbvalue.Text;
}
}
DataSet ds = new DataSet();
using (StringWriter sw = new StringWriter())
{
dt.WriteXml(sw);
XML = sw.ToString();
}
string strStatus = string.Empty;
}
this wat i done how to proceed..?
}
Reply
Answers (
1
)
combobox error
How to write the delete query in sqlserver