Re: Binding Hyperlink.NavigateUrl declaratively
- From: wawang@xxxxxxxxxxxxxxxxxxxx ("Walter Wang [MSFT]")
- Date: Fri, 14 Sep 2007 03:24:42 GMT
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@xxxxxxxxxxxxxxxxxxxx, 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.
.
- Follow-Ups:
- Re: Binding Hyperlink.NavigateUrl declaratively
- From: Dmitry Duginov
- Re: Binding Hyperlink.NavigateUrl declaratively
- References:
- Binding Hyperlink.NavigateUrl declaratively
- From: Dmitry Duginov
- Re: Binding Hyperlink.NavigateUrl declaratively
- From: densial
- Re: Binding Hyperlink.NavigateUrl declaratively
- From: Dmitry Duginov
- Binding Hyperlink.NavigateUrl declaratively
- Prev by Date: RE: IIS7 on Vista and SQLExpress problem
- Next by Date: RE: <%# IsEditable %> and <%= IsEditable %>
- Previous by thread: Re: Binding Hyperlink.NavigateUrl declaratively
- Next by thread: Re: Binding Hyperlink.NavigateUrl declaratively
- Index(es):
Relevant Pages
|