Server.HtmlEncode DataBinder

F

Fossie

Can anyone help with Server.HtmlEncode encoding this?

'<%# DataBinder.Eval(Container.DataItem, "CAT_ID",
"pageview.aspx?tab=1&catid={0}") %>

I've tried using similar to this:
<%# Server.HtmlEncode(DataBinder.Eval(Container,
"DataItem.Field1").ToString()) %>

but get error message BC30455: Argument not specified for parameter '

Many thanks
 
A

Ankit Aneja

'<%#"/admin/managenews.aspx?action=2&id="+DataBinder.Eval(Container.DataItem,"NID")%>'
this may help u
 
F

Fossie

Thanks - I tried the + and got this error message:

Conversion from string "pageview.aspx?tab=1&catid=1" to type 'Double'
is not valid.
 
A

Ankit Aneja

'<%#"/pageview.aspx?tab=1&catid="+DataBinder.Eval(Container.DataItem,"CAT_ID")%>'
 
A

Ankit Aneja

<asp:HyperLink id="hyperlinkk1" Runat="server"
NavigateUrl='<%#"/pageview.aspx?tab=1&catid="+DataBinder.Eval(Container.DataItem,"CAT_ID")%>'</asp:HyperLink>
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top