0
我有這個頁面叫檔案。我運行應用程序時的時間是錯誤的。有人能幫我糾正時間到正確的格式嗎?asp.net個人檔案
<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>
Last Visted On : <%# Eval("LastActivityDate")%>
<br />
</ItemTemplate>
</asp:Repeater>
</div>
</LoggedInTemplate>
</asp:LoginView>
我想出了自己。我本來應該添加Now()。ToString()。這是正確的代碼:Last Visted On:<%#Eval(「LastActivityDate」)。Now()。ToString()%> – onfire4JesusCollins 2010-10-22 12:25:26