<%@ Import Namespace="System.IO"%>
<%@ Page Language="VB" %>
<script runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
Dim FileIn As New FileInfo(Server.MapPath("MyFiles/thaicreate.txt"))
If FileIn.Exists Then
FileIn.Delete()
Me.lblText.Text = "Files Deleted."
Else
Me.lblText.Text = "Files Not Delete."
End If
End Sub
</script>
<html>
<head>
<title>ThaiCreate.Com ASP.NET - Delete Files</title>
</head>
<body>
<form runat="server">
<asp:Label id="lblText" runat="server"></asp:Label><br />
</form>
</body>
</html>