I hate to spoil the fun, but I wouldn't recommend doing this.
First of all, Eval *does* have an overload that allows you to format the expression:
http://msdn2.microsoft.com/en-us/library/2d76z3ck.aspx
The DataBinder class has two overloads: one that accepts the object and a single string (the name of the property on the object) and another one that accepts an additional format expression.
Snuffles: the code you posted was, as Doug said, invalid. However, this isn't because Eval doesn't have an overload, but because you were missing a ):
NavigateUrl='<%# Eval("PKClient", "ClientSummary.aspx?PKClient={0}"%>'
should be
NavigateUrl='<%# Eval("PKClient", "ClientSummary.aspx?PKClient={0}"
)%>'
Notice the additional ) between the " and the %. You just forgot to close the call to Eval.
With the ) in place, your example will run fine.
Personally, I would never hard code the path in my select statement against the database. It makes it really hard to reuse the same code in a different scenario. It also makes it near impossible for others to find out why a certain page redirects to some location. Using the Format expression as you posted is, IMO, the best way to go.
As an alternative, you could have also used simple string concatenation:
NavigateUrl='<%# "ClientSummary.aspx?PKClient=" + Eval("PKClient") %>'>
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.