简体   繁体   中英

asp.net profiles

I have this page called profile. The time is wrong when I run the application. Can someone help me correct the time to the right format?

 <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
           <strong>To View Profiles You Have to Register Or </strong> <asp:HyperLink ID="HyperLink1" runat="server" 
                NavigateUrl="~/Account/Login.aspx" Font-Size="Large" Font-Bold="True">Login</asp:HyperLink>
        </AnonymousTemplate>
        <LoggedInTemplate>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                SelectCommand="SELECT [UserId], [UserName], [LastActivityDate] FROM [vw_aspnet_Users]"></asp:SqlDataSource><br />
                <div align="center">
            <h1 style="text-align:center;
    font-size: x-large;
    font-weight: bold;
    border: solid 2px gold;
    background-color: #ffc;
    padding: 5px;
    margin-bottom: 15px;
    width: 66%;">
                Members Of Living To Please The Lord World(Ephesians 5:10) !
            </h1>
        </div><br />
        <div style="padding-left:10px" align="center">
            <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">
            <ItemTemplate>
            <a id="A1" href=<%#"~/Profiles.aspx?UserId=" & Eval("UserId").ToString %> runat="server" style="font-size:large;">
            <%#Eval("UserName") %>
            </a>&nbsp;&nbsp;&nbsp;&nbsp;
            Last Visted On : <%# Eval("LastActivityDate")%>
             <br />
            </ItemTemplate>
            </asp:Repeater>
            </div>
        </LoggedInTemplate>
    </asp:LoginView>

好的,如果这真的是MVC,它应该看起来像这样:<%= Model.LastActivityDate.ToShortDateString()%>但我认为您这里拥有ASP.NET表单。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM