开发者

Cannot convert from 'System.Collections.Generic.List<business.clspluginsprp>' to 'business.clspluginsprp

I was trying to display the data in Grid View int he following manner but I am getting this 开发者_如何学JAVAerror.

List<business.clspluginsprp> objprp = new List<business.clspluginsprp>();
business.clsplugins obj = new business.clsplugins();

for (Int32 i = 0; i < k.Length; i++)
{

    Int32 z = Convert.ToInt32(k.GetValue(i));
    objprp.Add(obj.fnd_plugins(z));

}

GridView2.DataSource = objprp;
GridView2.DataBind();

I am really not a pro in ASP.NET. Please help in resolving this error. Edit-- Full code of the event http://pastebin.com/pX2mNRna


I would guess your fnd_plugins method returns a List in stead of a single object. You can use addRange on the objprp to add a list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜