Server Error in '/YLM/YLM' 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 949:    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
Line 950:
Line 951:        Me.Page.UICulture = CStr(oWebCommon.GetLanguage(Request, Session, Server))
Line 952:
Line 953:    End Sub

Source File: C:\Websites\YLM\ylm_20200730\ylm_home.aspx.vb    Line: 951

Stack Trace:


[InvalidCastException: Conversion from type 'DBNull' to type 'String' is not valid.]
   Microsoft.VisualBasic.CompilerServices.Conversions.ToString(Object Value) +1307492
   DBCommon.SetPaymentParamsFromDB(Int64 iFilterID, HttpSessionState oSession) +1706
   WebFormCommon.SetFilterParameters(MasterPage oMaster, HttpSessionState oSession, HttpRequest oRequest, HttpServerUtility oServer) +215
   WebFormCommon.GetLanguage(HttpRequest oRequest, Object oSession, HttpServerUtility oServer) +126
   ylm_home.Page_PreInit(Object sender, EventArgs e) in C:\Websites\YLM\ylm_20200730\ylm_home.aspx.vb:951
   System.Web.UI.Page.OnPreInit(EventArgs e) +9865826
   System.Web.UI.Page.PerformPreInit() +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +302


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