Advanced Search

Results 1 to 2 of 2

Thread: Displaying Date/Time User Logs On

  1. #1
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Displaying Date/Time User Logs On

    Hi All,

    I have a website which has users, they login and not to much happens BUT on the backend I can see all the members through ASP.NET pages that have been set up. I wanted to add the last date/time a user logged in so added this into my memberstable in My SQL and tested it out, I added myself as a user looked at the DB through PHPMyAdmin and sure enough it had populated the datetime column... In the ASP.NET page I can show my users and it displays First, Last and State they live in... For some reason if I add the date, it breaks the code. I have even tried replacing 'state' with 'logindatetime' and even that doesn't work... Any help would be much appreciated... Below is the code from the ASP.NET page
    Code:
    <asp:DataList	ID="MySQLDataGrid"
    								runat="server" 
    								OnEditCommand="Edit_Command" 
    								OnUpdateCommand="Update_Command" 
    								OnCancelCommand="Cancel_Command"								
    								OnDeleteCommand="Delete_Command" 
    								OnItemCreated="btnDelete_ItemCreated" 
    								OnItemDataBound="ddl_ItemDataBound"	
    								RepeatLayout="Table" 
    								DataKeyField="ID" 
    								autogeneratecolumns="False" 
    								BorderStyle="None"
    								BorderWidth="0px" 
    								CssClass="gdvw" Width="100%">	
    					<headertemplate>
    					<tr>
    						<td class="label" width="20%">&nbsp;&nbsp;&nbsp;<strong>Firstname</strong></td>
    						<td class="label" width="20%"><strong>Lastname</strong></td>
    						<td class="label" width="20%" align="center"><strong>State</strong></td>
    						<td class="label" width="20%" align="center">&nbsp;</td>
    						<td class="label" width="10%" align="center">&nbsp;</td>
    						<td class="label" width="20%" align="center">&nbsp;</td>					
    					</tr>					
    					</headertemplate>			
    					<itemtemplate>
    					<tr>
    						<td class="label" width="20%">&nbsp;&nbsp;&nbsp;<a title="View Member's Profile" href="javascript:del=window.open('members_view.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID")%>','del','width=640,height=480,toolbar=no,menubar=no,status=no,titlebar=no,resizable=yes,scrollbars=yes');del.focus();" class="navlink"><%# DataBinder.Eval(Container.DataItem, "Firstname")%></a></td>
    						<td class="label" width="20%"><a title="View Member's Profile" href="javascript:del=window.open('members_view.aspx?id=<%# DataBinder.Eval(Container.DataItem, "ID")%>','del','width=640,height=480,toolbar=no,menubar=no,status=no,titlebar=no,resizable=yes,scrollbars=yes');del.focus();" class="navlink"><%# DataBinder.Eval(Container.DataItem, "lastname")%></a></td>
    						<td class="label" width="20%" align="center"><%# DataBinder.Eval(Container.DataItem, "state")%></td>
    						<td class="label" width="20%" align="center"></td>
    						<td class="label" width="10%" align="center"><asp:LinkButton ID="btnEdit" runat="server" CommandName="Edit" Text="Edit " CssClass="navlink" /></td>
    						<td class="label" width="10%" align="center"><asp:LinkButton ID="btnDelete" runat="server" CommandName="Delete" Text="Delete" CssClass="navlink" /></td>
    					</tr>					
    					</itemtemplate>
    					<edititemtemplate>
    					<tr>
    						<td class="label2" width="20%">&nbsp;&nbsp;&nbsp;<%# DataBinder.Eval(Container.DataItem, "firstname")%></td>
    						<td class="label2" width="20%"><%# DataBinder.Eval(Container.DataItem, "lastname")%></td>
    						<td class="label2" width="20%" align="center"><%# DataBinder.Eval(Container.DataItem, "state")%></td>
    						<td class="label2" width="20%" align="center">
    						<asp:DropDownList ID="ddlstatus" runat="server" AutoPostBack="False" CssClass="ddl1">
    							<asp:ListItem Value="" Text="Please Select..."/>
    							<asp:ListItem Value="A" Text="Approved"/>
    							<asp:ListItem Value="D" Text="Deleted"/>
    							<asp:ListItem Value="H" Text="On Hold"/>
    							<asp:ListItem Value="P" Text="Pending"/>
    							<asp:ListItem Value="R" Text="Rejected"/>
    						</asp:DropDownList></td>
    						<td class="label2" width="10%" align="center"><asp:LinkButton ID="btnUpdate" runat="server" CommandName="Update" Text="Update" CssClass="navlink" /></td>
    						<td class="label2" width="10%" align="center"><asp:LinkButton ID="btnCancel" runat="server" CommandName="Cancel" Text="Cancel" CssClass="navlink" /></td>
    					</tr>
    					</edititemtemplate>
    					<footertemplate>
    					</table>
    					</footertemplate>
    
    				</asp:DataList>

  2. #2
    Join Date
    Apr 2006
    Posts
    584
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Is there no one that can me out, I'm tearing my hair out trying to resolve my issue

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •