How to Get Last Updated Date of Profile user in ASP.NET

January 13, 2014 0 Comments

Step-1: Add this code into web.config file

<?xml version="1.0"?>

  For more information on how to configure your ASP.NET application, please visit


      <authentication mode="Windows" />
          <add name="UserName"/>
        <compilation debug="false" targetFramework="4.0" />


Step-2: Add this code into .aspx page (Before add this code, please create profile first )

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<script runat="server">  
    protected void Page_Load(object sender, System.EventArgs e)  

    protected void update_date(object sender, EventArgs e)
        Label1.Text += "current Date and Time is " + DateTime.Now.ToString() +"<br/>";
        Label1.Text += "Profile LastUpdate Date is " + Profile.LastUpdatedDate;

<html xmlns="">  
<head id="Head1" runat="server">  
    <title>Get Lastupdated Date</title>  
    <form id="form1" runat="server">  
        <h2>Last updated Date</h2>
        <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
        <br />
        <br />
        <asp:Button ID="Button1" runat="server" Text="Get Last Updated Date" 
            Width="169px" onclick="update_date" />
        <br /><br />  

Code Generate the following output

How to Get Last Updated Date of Profile user in ASP.NET

Jacob Lefore

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google