QueryString Value Not Passed through HyperLinkField.DataNavigateUrlFormatString

H

HillBilly

MSDN doc http://tinyurl.com/lzz857 says their example will
pass the value of the bound field UnitPrice through the
formatter as the value for the ProductID QueryString.

But my code used in a GridView Column template will
only pass the formatter as literal text i.e. {0}
which shows up in the URL of the page as
Homepage.aspx?tweetContents={0}

// MSDN
<asp:hyperlinkfield datatextfield="UnitPrice"
datatextformatstring="{0:c}"
datanavigateurlfields="ProductID"
datanavigateurlformatstring="~\details.aspx?ProductID={0}"
headertext="Price"
target="_blank" />

// my code
<asp:HyperLinkField
DataNavigateUrlFields="TweetContents"
DataNavigateUrlFormatString="~/Homepage.aspx?tweetContents={0}"
NavigateUrl="~/Homepage.aspx?tweetContents={0}"
HeaderText="ReTweet"
Text="Send Again" />
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top