<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void Button1_Click(object sender, System.EventArgs e)
{
//set your own datetime here which you need.
DateTime mydate = DateTime.Now;
GridView1.DataSource = ProfileManager.GetAllInactiveProfiles(ProfileAuthenticationOption.Authenticated,mydate);
GridView1.DataBind();
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to get all inactive profiles in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:Navy">asp.net profile example: Get All Inactive Profiles</h2>
<asp:GridView
ID="GridView1"
runat="server"
AutoGenerateColumns="true"
BackColor="Snow"
ForeColor="DarkMagenta"
BorderColor="DimGray"
BorderStyle="Dotted"
BorderWidth="2"
AllowSorting="true"
AllowPaging="true"
PageSize="5"
>
</asp:GridView>
<br />
<asp:Button
ID="Button1"
runat="server"
Font-Bold="true"
ForeColor="SeaGreen"
Text="Get All Inactive Profiles"
OnClick="Button1_Click"
/>
</div>
</form>
</body>
</html>
No comments:
Post a Comment