Hi,
I want to be able to use an eval within a loginview nested within a gridview, the only problem is the <%#eval("id")%> is not rendering. Could anyone please help? I am really trying to avoid using a findcontrol on the rowcreated to find the panel and hiding it depending on whether the user is logged on or not.
Many thanks in advance..
Code Below :D
<asp:GridView id="records"
DataSourceID="data"
DataKeyNames="id"
AutoGenerateColumns="false"
runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<%#eval("id") %>
<strong><%#Eval("store")%></strong><br/>
<%#eval("address") %><br/>
<%#eval("postCode") %><br/>
<%#eval("region") %><br/>
<a href="http://forums.asp.net/AddPost.aspx?ForumID=24#">View Map</a>
<asp:LoginView id="recordAdmin" runat="server">
<LoggedInTemplate>
<div class="adminRight">
<a href="store.aspx?store=<%#eval("id") %>">Edit Store</a> |
<asp:LinkButton ID="btnDelete" Text="Delete" CommandName="Delete" OnClientClick="return confirm('Are you sure you wish to delete the store?');" runat="server"/>
</div>
</LoggedInTemplate>
</asp:LoginView>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>