Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to return 3 lists data from once class to Visual Web part

$
0
0

Hi All,

I have created a Visual Web Part and added a class(Splogic.CS) for SharePoint logic purpose.

In Visual Web Part i have added 4 dropdownlists. In Class Splogic.CS i wrote a method which fetch data from 4 different lists.like follow

using(spcontext obj)

{
	using(spweb object)
	{
            tryGetList();
            foreach(SPlistitem item in list.item)
             {
                What to do here?
              }
tryGetList();
            foreach(SPlistitem item in list.item)
             {
                What to do here?
              }
tryGetList();
            foreach(SPlistitem item in list.item)
             {
                What to do here?
              }
tryGetList();
            foreach(SPlistitem item in list.item)
             {
                What to do here?
              }

	}
}


so here i can get all 4 list's data. But my question is how to get that data from this class and bind each lists data to a separate Dropdownlist.

Please tell me how could i solve this? 


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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