where I show a link if value>0 .. However it gives me a bad url(history.aspx?visitorid=%3C%#%20Eval) when I put visitorID=<%#...%>inside another Eval<%#..%>
As your strings get more complex, you'll find it's easier to build them using static methods in your code behind. Then in your ASPX you'll have something simple like <%# GetLink(Eval("VisitorId")) %>
发布评论
评论(3)
您可以分隔该字符串,如下所示:
You could seperate that string, like this:
如果您按如下方式编写代码,则可以调用第二个 Eval:
You can have the second Eval called if you code it like this:
随着字符串变得越来越复杂,您会发现在后面的代码中使用静态方法构建它们会更容易。然后在您的 ASPX 中,您将看到一些简单的内容,例如 <%# GetLink(Eval("VisitorId")) %>
As your strings get more complex, you'll find it's easier to build them using static methods in your code behind. Then in your ASPX you'll have something simple like <%# GetLink(Eval("VisitorId")) %>