HyperLink with NavigateUrl with Eval(). Where is the mistake?

匿名 (未验证) 提交于 2019-12-03 01:57:01

问题:

First I was changing HyperLink.NavigateUrl in code-behind on Page_Load().

But after I decided to do it in design using Eval() method.

or

where id and type - are variables from Request.

But it doesn't work. Only raw text 'Refuse' is shown. Where is my mistake? Thanks in advance.

回答1:

this is working great

NavigateUrl='' 


回答2:

This worked for me

NavigateUrl='' 


回答3:

Try and ViewSource in your browser, what's being rendered to the client in your href? Is it what you expected?. If you are trying to use variables from the request collection you can't use Eval, you need to use the Request query string parameters.



回答4:

Try this:

HttpUtility.UrlEncode(Eval("type") 


回答5:

Try this one:

Accept


回答6:

Try this it worked for me:

Eval("type").ToString() 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!