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 39:         Dim sql As String = "select * from flight.location where name='" & mf.setquote(Request("country")) & "' and type='country'"
Line 40:         Dim dt As DataTable = mf.SelectDBRows_mysql(sql, constring_sql)
Line 41:         If dt.Rows.Count > 0 Then
Line 42:             Dim country_id As Integer = mf.n2text(dt.Rows(0).Item("id"))
Line 43:             lab_country_id.Text = country_id

Source File: D:\vietsmile\webVisa\smiletravelvietnam\tips\post_tip.aspx.vb    Line: 41

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   tips_post_tip.page_title() in D:\vietsmile\webVisa\smiletravelvietnam\tips\post_tip.aspx.vb:41
   tips_post_tip.Page_Load(Object sender, EventArgs e) in D:\vietsmile\webVisa\smiletravelvietnam\tips\post_tip.aspx.vb:16
   System.Web.UI.Control.OnLoad(EventArgs e) +105
   System.Web.UI.Control.LoadRecursive() +67
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3784


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