Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

how to split string in data table row in c#

$
0
0

hi,

Binding List data in to data table,. in that table i have description column. this column data move to data table in sql server

here we facing problem for Description column

the description column having data is

<div class="ExternalClassE4908D8C25DF4D1586D0A010BFBC5A53">3400</div>

now we want only 3400 values i am using this code

ring Descrption = rows["Description"].ToString();
                                    if (! string.IsNullOrEmpty(Descrption))
                                    {
                                        char[] splitString = new char[] { '<', '>' };
                                        string[] parts = Descrption.Split(splitString,
                                                         StringSplitOptions.RemoveEmptyEntries);
                                        // string[] Dec_1 = Dec.Split(new char[] { '<' }, StringSplitOptions.RemoveEmptyEntries);

                                        rows["Description"] = parts[1].ToString();
}


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>