I have code like this
<html>
<head>
<title></title>
</head>
<body>
<%
Function GetGUID()
GetGUID = CreateObject("Scriptlet.TypeLib").GUID
End Function
if Request.ServerVariables("REQUEST_METHOD") = "POST" then
if session("token") = cstr(Request.Form("csrftoken")) then
response.write("Same")
else
response.write("different")
end if
else
dim token
token = GetGUID()
session("token")=token
end if
%>
<form method="post" action="test.asp">
<input type="text" name="nama" placeholder="Input name">
<input type="submit" value="submit">
<input type="hidden" value="<%= session("token") %>" name="csrftoken">
</form>
</body>
</html>
But when I click the submit button, different always be printed. I'am very sure that those variable(session & csrftoken) have the same value, because I already check that via printing those variable.
UPDATE
Thanks all for all your help, the problem is fixed now. It's because GUID that return null-terminated string. For reference you can see here: Link. Thanks Lankymart for the reference :)