/// <summary>
/// HTML Decode a single column of string field in a Data Table
/// </summary>-
/// <param name="dTable"></param>
/// <param name="fieldName"></param>
/// <returns></returns>
public static DataTable HtmlDecodeDataTable(DataTable dTable, string fieldName)
{
foreach (DataRow drow in dTable.Rows)
{
if (drow[fieldName] != null && drow[fieldName] is string)
{
drow[fieldName] = System.Web.HttpUtility.HtmlDecode((drow[fieldName].ToString()));
}
}
dTable.AcceptChanges();
return dTable;
}
/// HTML Decode a single column of string field in a Data Table
/// </summary>-
/// <param name="dTable"></param>
/// <param name="fieldName"></param>
/// <returns></returns>
public static DataTable HtmlDecodeDataTable(DataTable dTable, string fieldName)
{
foreach (DataRow drow in dTable.Rows)
{
if (drow[fieldName] != null && drow[fieldName] is string)
{
drow[fieldName] = System.Web.HttpUtility.HtmlDecode((drow[fieldName].ToString()));
}
}
dTable.AcceptChanges();
return dTable;
}
No comments:
Post a Comment