Server Error in '/' Application.

Conversion from type 'DBNull' to type 'String' is not valid.

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.InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.

Source Error:


Line 123:                                <div class="photo-back-BM">
Line 124:                                    <div class="ThumBM" style="border: solid 0px green; text-align: center;">
Line 125:                                       <a href="#"  style="cursor:default;"class="tip" title='<%# Mid(DataBinder.Eval(Container.DataItem, "FirstName"),1,10)%>   <%# Mid(DataBinder.Eval(Container.DataItem, "LastNAME"),1,11)%><br />Batch: <%#Mid(DataBinder.Eval(Container.DataItem, "Batch"), 1, 11)%><br>City: <%#Mid(DataBinder.Eval(Container.DataItem, "HomeCity"), 1, 10)%>'> <img height="57" width="57" src='../AlumniImages/Thumb/<%#DataBinder.Eval(Container.DataItem, "Photo")%>' border="0"   /></a>
Line 126:                                    </div>
Line 127:                                    <div style="float: left; height: auto; width: 100%; text-align: center; border: solid 0px pink;

Source File: D:\ECARE\alumni\searchAlumni.aspx    Line: 125

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +715783
   ASP.searchalumni_aspx.__DataBind__control10(Object sender, EventArgs e) in D:\ECARE\alumni\searchAlumni.aspx:125
   System.Web.UI.Control.OnDataBinding(EventArgs e) +132
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +170
   System.Web.UI.Control.DataBindChildren() +11162975
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +674
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +68
   searchAlumni.GetAllActiveAlumni() in D:\ECARE\alumni\searchAlumni.aspx.vb:35
   searchAlumni.Page_Load(Object sender, EventArgs e) in D:\ECARE\alumni\searchAlumni.aspx.vb:22
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062