I have one datarow which contains some rows. Now i am copying values from datarow to arraylist using forloop.
But this is again taking some time.
Now i want copy values form datarow to arraylist or array without using forloop.
Is there any way to implement this using LINQ or any other concept.
The code which i used is mentioned below.
DataSet dsForData = null;
if (Session[strSessionDataList] == null)
CatalogController _controller = new CatalogController();
Session[strSessionDataList] = arrayListFordata;
dsForData = new DataSet();
dsForData = Session[strSessionDataList] as DataSet;
myTable = dsForData.Tables;
if (myTable.Rows.Count > 0)
foundRows = myTable.Select("val like '" + item + "%'");
arrayForData = new Array[foundRows.Length];
foundRows.CopyTo(arrayForData, 0); This is not working, it is giving runtime error like type mismatch
//for (int count = 0; count < foundRows.Length; count++)
Actually, I have developed this project like as online quiz and there is one question is display at a time and there is two buttons(Next & Previous) and I am using radiobuttonlist to populate options of that question.
I want to maintain state of checked option when i click on previous/next button
My question are:
1. how can we bind an in-memory (not on disk) XmlDocument object to a XmlDataSource? and thus TreeView control? In the article author has suggested an alternative - OnTreeNodePopulate event - however, this is not suitable for my case as my whole list/hierarchy is loaded in one go, not once-per-node.
2. how can we set navigation Url? in standard "web.sitemap", you can do this with siteMapNode's "Url" attribute. But now that, as in above example, uses my own custom Xml... how do we do this?