I have a small portion of code that trips up my script every time i run it. I get the error message "Input string was not in a correct format". The offending code is:
I also get it when running:Code:Dim sScriptName as string = Request.ServerVariables("SCRIPT_NAME").ToLower() Dim iLastSlash as integer = sScriptName.LastIndexOf("/") sScriptName = sScriptName.Substring(iLastSlash + 1) If (sScriptName.ToString() = Not "default.aspx") And (sScriptName.ToString() = Not "users.aspx") Then If Session("Admin") = "" Then Response.Redirect("Default.aspx") End If End If
Any ideas?Code:If Session("Admin") = Not DBNull.Value.ToString() Then ... End If




Reply With Quote