Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 148: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Line 149: Dim adap As New PhotoGalleryTableAdapters.ImageAlbums_SelectAllTableAdapter Line 150: Dim dt As Data.DataTable = adap.GetDataById(Convert.ToInt32(Request.QueryString("pid"))) Line 151: Dim id As Integer = Globalvariable.objcommon.GetIdforPhysicalpath(System.Web.HttpContext.Current.Request.ServerVariables("URL").ToString()) Line 152: If id = 0 Then

Source File: C:\Inetpub\vhosts\saffarinidxb.com\httpdocs\ar\photogallery\PhotoGallery.aspx.vb    Line: 150

Stack Trace:


[FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +10518915 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +207 System.Convert.ToInt32(String value) +46 en_PhotoGallery_PhotoGallery.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\saffarinidxb.com\httpdocs\ar\photogallery\PhotoGallery.aspx.vb:150 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