Here is an example. You may need change path. I creating file in 'db' folder on wwwroot. Make sure you have read-write permiossions to this folder.
Code:
<html>
<head>
<title>Type your ASP code here</title>
</head>
<%
Dim fso
Dim fso_file, act
Dim fso_stream
Dim mycode
Dim fileName

act=request("act")
if len(act)<>0 then

	mycode=request.form("code")
	fileName="codetest.asp"
	filePath=server.mappath("/db/") & "\" & fileName
	
	set fso=server.createobject("Scripting.FileSystemObject")
	fso.CreateTextFile(filePath)
	
	set fso_file=fso.GetFile(filePath)
	set fso_stream=fso_file.OpenAsTextStream(2)
	
	fso_stream.write "<html><head><title>Code Execute</title></head><body>" & _
						mycode & _
						"</body></html>"
	fso_stream.close
	
	response.write "Result:<hr><span style='background:#E4E4E4'>"
	server.execute "../db/" & fileName
	response.write "</span><hr><br>"
	
	fso_file.delete true
	
	set fso_file=nothing
	set fso_stream=nothing
	set fso=nothing

end if
%>
<body>
Type your ASP code here:
<form method="POST" action="code.asp?act=1">
<textarea name="code" rows="17" cols="89"></textarea><br>
<input type="submit" value="Execute Code" name="exec">
</form>
</body>
</html>