Pazljivo sam citao ali ok, ne bih da rasplamsavam strasti.
evo primera:
Code:
<asp:datalist id="dlUsers" runat="server">
<headertemplate>
<table style="border-collapse:collapse" border="1" cellpadding="4" cellspacing="0" rules="rows" width="100%">
<thead>
<th>IME</th>
<th>PREZIME</th>
</thead>
</headertemplate>
<itemtemplate>
<tr>
<td><a href="NewForm.aspx?id=<%# DataBinder.Eval(Container.DataItem, "UserID")%>"><%# DataBinder.Eval(Container.DataItem,"IME") %></a></td>
<td><%# DataBinder.Eval(Container.DataItem,"PREZIME") %></td>
</tr>
</itemtemplate>
<footertemplate>
</table>
</footertemplate>
</asp:datalist>
u codebehind treba samo ovo:
Code:
dlUsers.DataSource = DataSet/DataTable/...;
dlUsers.DataBind();
a na strani NewForm.aspx hvatas querystring:
Code:
string id = Request["id"].ToString();
I to je to, imas id i po njemu izvuces detalje o useru.