<%@ Page Language="C#" %>
<!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;
int totalInactiveProfiles;
totalInactiveProfiles = ProfileManager.GetNumberOfInactiveProfiles(ProfileAuthenticationOption.Authenticated,mydate);
Label1.Text = "Total Inactive Profiles: " + totalInactiveProfiles;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to get number of inactive profiles in asp.net</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color:Green">asp.net profile example:<br />Get Number Of Inactive Profiles</h2>
<asp:Label
ID="Label1"
runat="server"
Font-Bold="true"
Font-Size="Large"
ForeColor="Teal"
>
</asp:Label>
<br /><br />
<asp:Button
ID="Button1"
runat="server"
Font-Bold="true"
ForeColor="HotPink"
Text="Get Number Of Inactive Profiles"
OnClick="Button1_Click"
/>
</div>
</form>
</body>
</html>
No comments:
Post a Comment