nvdp
02-03-2009, 02:18 PM
I have the following ASP code that works great in ASP. Basically, the idea is to check to see if a file exists. If it does, then redirect to a text file. If not, then redirect to Google. I need some help creating this code in ASP.NET. I work in IT, but not in ASP.NET - so this is new to me. Any help would be appreciated.
<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists ("D:\Inetpub\Wwwroot\smart_avail.txt") Then
Response.redirect "/test/asp/main.aspx"
Else
Response.redirect "http://www.google.com"
End If
%>
<%
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists ("D:\Inetpub\Wwwroot\smart_avail.txt") Then
Response.redirect "/test/asp/main.aspx"
Else
Response.redirect "http://www.google.com"
End If
%>