find particular valu

Posted by Ultimateji under XML on 8/18/2010 | Points: 10 | Views : 1263 | Status : [Member] | Replies : 1
I am using Asp.net 2005. i have a XML file in one folder. I read the data from XML file and put it in dataset. From dataset using datareader via, i want to read one particular column. how can i do?
Pls reply me.


Thanks,
Selvaganapathi.S




Responses

Posted by: Raja on: 8/18/2010 [Member] Starter | Points: 25

Up
0
Down
Lets take an example:

You have a DataSet named dSet in which your xml data is there.

you can read the column using

string str = dSet.Tables[0].Rows[0]["YourColumnName"].ToString();


This should give you the value of "YourColumnName", from first row of the first datatable in the DataSet.

Hope this will work for you.

Thanks

Regards,
Raja, USA

Ultimateji, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response