<%@ Application Language="C#" %>
<%@ Import Namespace="System.Xml.Linq" %>
<%@ Import Namespace="System.Linq" %>
<script runat="server">
void Session_End(object sender, EventArgs e)
{
MyLinqDataClassesDataContext mylinq = new MyLinqDataClassesDataContext();
if (Session["uname"] != null)
{
var deleteuser = from p in mylinq.userCredentials
where p.uname_db.Contains(Session["uname"].ToString())
select p;
mylinq.userCredentials.DeleteAllOnSubmit(deleteuser);
mylinq.SubmitChanges();
}
}
</script>
No comments:
Post a Comment