Re: Binding Hyperlink.NavigateUrl declaratively
- From: "Dmitry Duginov" <dima@xxxxxxxxxxxxx>
- Date: Thu, 13 Sep 2007 19:52:02 -0400
"densial" <densial@xxxxxxxxx> wrote in message
news:1189723454.951892.23210@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Sep 14, 10:21 am, "Dmitry Duginov" <d...@xxxxxxxxxxxxx> wrote:
I have a FormView and a HyperLink on the page.
If I use the following code behind (hooked up to Hyperlink's OnLoad
event),
it renders fine
protected void link_Load(object sender, EventArgs e)
{
link.NavigateUrl = String.Format("~/Carrier/AddNew.aspx?Id={0}",
FormView1.DataKey.Value);
}
However, I was not able to achieve the same goal declaratively, just
using
<%# ... %> syntax in .aspx
Where's the catch?
Dmitry
show us your code for the second one
Any of the following renders just text instead of hyperlink:
NavigateUrl='<%# String.Format("~/Carrier/AddNew.aspx?Id={0}",
Eval("FormView1.DataKey.Value")) %>'
NavigateUrl='<%# String.Format("~/Carrier/AddNew.aspx?Id={0}",111) %>'
NavigateUrl='<%# Eval("FormView1.DataKey.Value") %>'
D.
.
- Follow-Ups:
- Re: Binding Hyperlink.NavigateUrl declaratively
- From: "Walter Wang [MSFT]"
- Re: Binding Hyperlink.NavigateUrl declaratively
- References:
- Binding Hyperlink.NavigateUrl declaratively
- From: Dmitry Duginov
- Re: Binding Hyperlink.NavigateUrl declaratively
- From: densial
- Binding Hyperlink.NavigateUrl declaratively
- Prev by Date: Re: Recommendation.
- Next by Date: Re: FileUpload with Ajax?
- Previous by thread: Re: Binding Hyperlink.NavigateUrl declaratively
- Next by thread: Re: Binding Hyperlink.NavigateUrl declaratively
- Index(es):
Relevant Pages
|