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.
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.
Try this:
HttpUtility.UrlEncode(Eval("type")
Try this it worked for me:
Eval("type").ToString()