.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Getting the SelectionList Value

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :ASP.Net

Hi -- Need some help with a simple but couldn't find a solution problem. I have a mobile selection list (see blow) that I had programmatically filled in from a generic collection of Status object (see below) which was retrieved from the database since I wanted to use the ID and Value stored in there to the selection list.

Mobile SelectionList Sample

<mobile:SelectionList Runat="server" ID="SelListStatus">

Status Object model

public class Status
        public int Id { get; set; }
        public string Name { get; set; }

Filled in a generic collection of Status object

var statusList = new List<Status>();
while (reader.Read())
	var status = new Status
		Id = Convert.ToInt16(reader["StatusId"]),
		Name = (string)reader["StatusName"]

return statusList;

Then, I tried to fill in the mobile selection list control using:

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend