In php we use the following code to block the url link passing via text boxes or textarea on form submit(For avoid bad link
passing from contact us form ).Is there any methode like this in classic asp using vb.
if($_POST['Register'])
{
$username=$_POST['username'];
if (preg_match('~(?:[a-z0-9+.-]+://)?(?:\w+\.)+\w{2,6}\S*~i', $username))
{
die('Access Denied Avoid Link');
}
}
I use the following code in asp but shows error
<%@Language="VBScript%">
<%
Option Explicit
Dim Address
Address = Request("Address")
if(!preg_match("/^[a-zA-Z]+[:\/\/]+[A-Za-z0-9\-_]+\\.+[A-Za-z0-9\.\/%&=\?\-_]+$/i",& Address&))
{
Echo"Access Denied Avoid Link.";
Response.End
'Exit();
}
%>
Pls do help me .:-/