Server Error in '/' Application.

Sequence contains no elements

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: Sequence contains no elements

Source Error:


Line 22:         if (videoid != 0)
Line 23:         {
Line 24:             var vedios = context.videos.Where(b => b.V_id == videoid).First();
Line 25:             //<div id="title_line" class="profile-peragraph" runat="server" >
Line 26: 

Source File: c:\inetpub\vhosts\alumni.thepunjabschool.edu.pk\httpdocs\videos.aspx.cs    Line: 24

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +405
   videos.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\alumni.thepunjabschool.edu.pk\httpdocs\videos.aspx.cs:24
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4057.0