>> I have a FormView and a HyperLink on the page.
>>
[quoted text clipped - 17 lines]
>
> show us your code for the second one
Hi Dmitry,
I've done some test and both of following approaches should work for you:
<asp:HyperLink ID="link1" runat="server" Text="Link" NavigateUrl='<%#
String.Format("~/Carrier/AddNew.aspx?id={0}", Eval("Id"))
%>'></asp:HyperLink>
<br />
<asp:HyperLink ID="link2" runat="server" Text="Link2" NavigateUrl='<%#
String.Format("~/Carrier/AddNew.aspx?id={0}", FormView1.DataKey.Value)
%>'></asp:HyperLink>
The first one is assuming you need to use some field as the id; the second
one is the exact case as yours.
Please feel free to let me know if there's anything I can help.
Regards,
Walter Wang (wawang@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Dmitry Duginov - 14 Sep 2007 15:00 GMT
> Hi Dmitry,
>
[quoted text clipped - 4 lines]
> %>'></asp:HyperLink>
> <br />
First one doesn't woudn't since I dont have Id control
> <asp:HyperLink ID="link2" runat="server" Text="Link2" NavigateUrl='<%#
> String.Format("~/Carrier/AddNew.aspx?id={0}", FormView1.DataKey.Value)
> %>'></asp:HyperLink>
Second one "just" doesn't work. It renders text only:
<a id="ctl00_ContentPlaceHolder1_link2">Link2</a>
D.