Type mismatch: '[string: ""]'
asp-classic
Solution
OK, you're getting the parameter ID from the QueryString and checking if it's empty or zero, right? So, you should do something like:
MemberId = Request.QueryString("ID")
'*
'* Check for other than numbers just to be safe
'*
If (MemberId = "" Or Not IsNumeric(MemberId)) Then
MemberId = Session("MemberId")
End If
'*
'* We can't add this check on the above if because
'* in classic ASP, the expression is evaluated as a whole
'* which would generate an exception when converting to Int
'*
If (CInt(MemberId) = 0) Then
MemberId = Session("MemberId")
End If
Problem
I receive the following error when there is no value for querystring. (I mean like index.asp?ID=). Microsoft VBScript runtime error '800a000d' Type mismatch: '[string: ""]' index.asp, line 10 I tried converting NULL value to something else with the following code. It did not work. ``` MEMBERID = Request.QueryString("ID") If MEMBERID = "" or MEMBERID = 0 Then MEMBERID = Session("MEMBERID") End If ```