Lorna70
asked on
HyperLink with 2 parameters and Server.UrlEncode - can't get it all to work!
Hi I am struggling with the following piece of code:
<asp:HyperLink ID="HyperLink1" Text='<%#DataBinder.Eval(C ontainer.D ataItem,"C ompanyName ")%>' runat="server" NavigateUrl='<%# "displayCompany.aspx?ID=" + DataBinder.Eval(Container. DataItem, "CompanyID") + "&CN=" + Server.UrlEncode(Container .DataItem( "CompanyNa me"))%>' />
It worked fine before I tried to add Server.UrlEncode as CompanyName will often have spaces. The error is:
CS1955: Non-invocable member 'System.Web.UI.IDataItemCo ntainer.Da taItem' cannot be used like a method.
Please help me!
<asp:HyperLink ID="HyperLink1" Text='<%#DataBinder.Eval(C
It worked fine before I tried to add Server.UrlEncode as CompanyName will often have spaces. The error is:
CS1955: Non-invocable member 'System.Web.UI.IDataItemCo
Please help me!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER