开发者

c# how to update a field in a dataTable

I have a .net/ c# console app with a DataTable that I populated from a Database.

I want to run an update on a field in the DataTable to strip the HTML. the function i have in the console app to do this is called: StripTagsCharArray

its defined as:

static private string StripTagsCharArray(string source)

how can i invoke this to update the Description field in my DataTable?

i want to see if this will improve performance of my application as now i have a SQL UDF doing开发者_开发知识库 the HTML stripping.


in case some one needs this:

foreach (DataRow row in tmp.Rows)
            {
                row["Description"] = StripTagsCharArray(row["Description"].ToString());
            }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜