Posted on: 4/29/2015 6:05:38 PM | Views : 648


I have a Dropdown box that I want to bind with GridView. But the Id of the DropDownList Model is of type string. And I cannot add string as an optional parameter in my SelectMethod of the GridView. 
DropDown Model & Code :
public class ProjectViewModel { public string ProjectId { get; set; } public string ProjectName { get; set; } } .aspx <asp:DropDownList runat="server" AutoPostBack="true" ID="DisplayProject" ItemType="VincitoreCRMApplication.Models.ProjectViewModel" DataValueField="ProjectId" DataTextField="ProjectName" SelectMethod="GetProjects" AppendDataBoundItems="true"> <asp:ListItem Text="All" Value="" /> </asp:DropDownList> ...

Go to the complete details ...