Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 285
  • Last Modified:

how do i create bindingcollection in c#.net web application?

I am using MVP pattern,i am getting value from service layer as string of array like string[].
when ever i bind data to list box
public string[] DataSource
    {
        set
        {
           
            this.ASPxListBox1.DataSourceID = value;
            this.ASPxListBox1.DataBind();
}} i am getting error like Cannot implicitly convert type 'string[]' to 'string'
so i am wondering wheather i have to create collection or not..if so,pls let me know how to create collections.
0
neha_john
Asked:
neha_john
1 Solution
 
safiintCommented:
that happenned because you tried to assign

string (here "dataSourceId" ) to string[] (here "value")

so replace this line of code with your own:

  this.ASPxListBox1.DataSource = value;



and it'll  work
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now