Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 118:        Literal ltrVideo = (Literal)frmvVideo.FindControl("ltrVideo");
Line 119:
Line 120:        String strCode = ltrVideo.Text.Replace("https://www.youtube.com/watch?v=","");
Line 121:
Line 122:        ltrVideo.Text = "<iframe width='100%' height='422' src='https://www.youtube.com/embed/" + strCode + "?rel=0&autoplay=1' frameborder='0' allowfullscreen></iframe>";

Source File: g:\pleskvhosts\advaitkolarkar.com\httpdocs\InsidePage\Videos.aspx.cs    Line: 120

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   InsidePage_Videos.frmvVideo_DataBound(Object sender, EventArgs e) in g:\pleskvhosts\advaitkolarkar.com\httpdocs\InsidePage\Videos.aspx.cs:120
   System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +109
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +165
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +34
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +151
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +76
   System.Web.UI.WebControls.FormView.DataBind() +10
   InsidePage_Videos.LoadDataVideos2() in g:\pleskvhosts\advaitkolarkar.com\httpdocs\InsidePage\Videos.aspx.cs:87
   InsidePage_Videos.Page_Load(Object sender, EventArgs e) in g:\pleskvhosts\advaitkolarkar.com\httpdocs\InsidePage\Videos.aspx.cs:31
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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