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 <aspataListID="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%"> <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"> </td>
<td class="label" width="10%" align="center"> </td>
<td class="label" width="20%" align="center"> </td>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td class="label" width="20%"> <a title="View Member's Profile" href=http://www.htmlforums.com/archive/index.php/"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=y es');del.focus();" class="navlink"><%# DataBinder.Eval(Container.DataItem, "Firstname")%></a></td>
<td class="label" width="20%"><a title="View Member's Profile" href=http://www.htmlforums.com/archive/index.php/"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=y es');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%"> <%# 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">
<aspropDownList 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"/>
</aspropDownList></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>
</aspataList>Is there no one that can me out, I'm tearing my hair out trying to resolve my issue We need to see the datasource for itif you use the ASP.net 2.0 Membership login controls it would do this on its own
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 <aspataListID="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%"> <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"> </td>
<td class="label" width="10%" align="center"> </td>
<td class="label" width="20%" align="center"> </td>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td class="label" width="20%"> <a title="View Member's Profile" href=http://www.htmlforums.com/archive/index.php/"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=y es');del.focus();" class="navlink"><%# DataBinder.Eval(Container.DataItem, "Firstname")%></a></td>
<td class="label" width="20%"><a title="View Member's Profile" href=http://www.htmlforums.com/archive/index.php/"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=y es');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%"> <%# 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">
<aspropDownList 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"/>
</aspropDownList></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>
</aspataList>Is there no one that can me out, I'm tearing my hair out trying to resolve my issue We need to see the datasource for itif you use the ASP.net 2.0 Membership login controls it would do this on its own