After clicking on save button, I want to save my data into the table, but I am getting error as
Object reference not set to an instance of an object error
at line
xw.WriteElementString("Sr_No", GrdConfirmation.Rows[intCount].Cells[GrdConfirmation.Columns.GetColumnIndexByDataField("SR_NO")].Text.ToString());
Here is my saving code.
protected void btnSave_Click(object sender, EventArgs e)
{
System.Text.StringBuilder StrPubBldg = new System.Text.StringBuilder();
XmlWriter xw = XmlWriter.Create(StrPubBldg);
xw.WriteStartElement("DocumentElement");
{
if (GrdConfirmation.TotalRowCount > 0)
{
for (int intCount = 0; intCount < GrdConfirmation.Rows.Count; intCount++)
{
xw.WriteStartElement("WMS_P ...
Go to the complete details ...