error with conversion in asp mvc c#

AffodoNar

New Member
I am using the following lines of code:\[code\]NavItemsDataContext navDB = new NavItemsDataContext();Nav n = navDB.Navs.Select(row => row.ID == Convert.ToInt32(Request.Form["ID"]));\[/code\]I am trying to access any row in my database that has an ID that matches my hidden "ID" on my form. \[quote\] Error 23 Cannot implicitly convert type 'System.Linq.IQueryable' to 'MvcApplication1.Models.Nav'. An explicit conversion exists (are you missing a cast?)\[/quote\]
 
Back
Top