开发者

Rewrite HyperLinkField.DataNavigateUrlFormatString on the fly

开发者 https://www.devze.com 2022-12-27 06:02 出处:网络
I have a asp:GridView with a HyperLinkField. It\'s DataNavigateUrlFormatString property is set to View.开发者_C百科aspx?id={0}&isTechnical={1} and DataNavigateUrlFields to ID,isTechnical

I have a asp:GridView with a HyperLinkField.

It's DataNavigateUrlFormatString property is set to View.开发者_C百科aspx?id={0}&isTechnical={1} and DataNavigateUrlFields to ID,isTechnical

Where ID is primary column INT and isTechnical - BIT, i.e. SQL Server representation of bool.

So urls are being displayed like View.aspx?id=1&isTechnical=1 but I want to replace number with a true|false.

How can I do that? Suing DataBinging event someway?

RowDataBound event unfortunately didn't helped - changing DataNavigateUrlFormatString causes event re-raising and therefore - StackOverflowException.


ASP.NET 4.0 generates BIT fields as True|False strings

0

精彩评论

暂无评论...
验证码 换一张
取 消