c# - An error occurred while executing the command definition. See the inner exception for details in mvc 4 -


i getting following error on dropdownlist control:

an error occurred while executing command definition. see inner exception details. 

here view code crashing on:

@html.dropdownlist("packageid", null, htmlattributes: new { @class = "form-control" }) 

and here controller code data dropdownlist:

viewbag.packageid = new selectlist(db.packages, "u_package_id", "package_nme"); 

and here package controller, in case needed:

public class package     {         [key]         public int u_package_id { get; set; }          public string package_type_cd { get; set; }          public string package_nme { get; set; }          public string status { get; set; }          public string modify_user_id { get; set;}          public datetime modify_dt { get; set; }          public string package_category { get; set; }           public string i_package_nme { get; set; }          public guid msrepl_tran_version { get; set; }          public string invoicepackagename { get; set; }          public datetime createdate { get; set; }          public datetime lastmodifydate { get; set; }          public string invoice_package_nme { get; set; }          public boolean instcusaflag { get; set; }          public string instcusadisplayedname { get; set; }          public string instcusadisplayeddescription { get; set; }          public boolean prerequisiteflag { get; set; }          public guid prerequisiteid  { get; set; }     } } 


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

c# - MSDN OneNote Api: Navigate to never before opened page without opening a OneNote Application Window -