Raja

Raja

  • NA
  • 2k
  • 358.8k

How to replace empty column as "ND" using ASP.NET C#?

Jan 13 2017 1:22 AM
I want to set value for particular empty column in data set data table as "ND" in data set.
How to do it?
 
 What I have tried:
 
if (ds.Tables[s].Rows[i][Columncountvalue + 19].ToString().Trim() == "")
 {
ds.Tables[s].Rows[i][Columncountvalue + 19].ToString().Trim().Replace("", "ND");
 }
 the above code is i tried to fill the empty column as "ND" in dataset data table but below error is occurs

string cannot be of zero length. parameter name oldvalue

Answers (5)