Line 297: <tr style="width:5px;">
Line 298: <td align="center" style="font-size:12px;">
Line 299: <asp:HyperLink Runat= "server" -----------------------------> line marked in red!!!
Line 300:NavigateUrl='<%#Eval("UserLink?Parameter=" + Server.UrlEncode("gn")));%>'
Line 301:ID="Hyperlink1">
senior_oracl...
Member
30 Points
163 Posts
error with link
Nov 05, 2012 11:34 AM|LINK
where am i doing this wrong ?
<asp:Repeater ID="Repeater2" runat="server"> <HeaderTemplate> <table id="box-table-a" border="0" align="center""> <tr style="font-size:14px; background-color:#FFFBD6"> <th align="center"> Product Name</th> <th align="center"> Price</th> <th align="center"> Purchase Date</th> <th align="center"> Expiry Date</th> </tr> </HeaderTemplate> <ItemTemplate> <tr style="width:5px;"> <td align="center" style="font-size:12px;"> <asp:HyperLink Runat= "server" NavigateUrl='<%#Eval("UserLink?Parameter=" + Server.UrlEncode("gn")));%>' ID="Hyperlink1"> <%# Eval("Description") %></asp:HyperLink>when I run the page im getting :
Invalid expression term ','
and its marking :
Line 297: <tr style="width:5px;"> Line 298: <td align="center" style="font-size:12px;"> Line 299: <asp:HyperLink Runat= "server" -----------------------------> line marked in red!!! Line 300:NavigateUrl='<%#Eval("UserLink?Parameter=" + Server.UrlEncode("gn")));%>' Line 301:ID="Hyperlink1">any help please !!
juhi_it
Member
327 Points
157 Posts
Re: error with link
Nov 05, 2012 11:38 AM|LINK
Hi
your braces are miss matched in this line
NavigateUrl='<%#Eval("UserLink?Parameter=" + Server.UrlEncode("gn")));%>' remove last brace it's extra one and so it'll beJuhi Paunikar
Software Developer
senior_oracl...
Member
30 Points
163 Posts
Re: error with link
Nov 05, 2012 11:47 AM|LINK
now it is saying :
Compiler Error Message: CS1026: ) expected
????
MetalAsp.Net
All-Star
112219 Points
18266 Posts
Moderator
Re: error with link
Nov 05, 2012 11:59 AM|LINK
senior_oracl...
Member
30 Points
163 Posts
Re: error with link
Nov 05, 2012 12:18 PM|LINK
??
BrockAllen
All-Star
27554 Points
4912 Posts
MVP
Re: error with link
Nov 05, 2012 01:22 PM|LINK
I don't thnk you want that semicolon in there -- Think of the <%# %> syntax as an expression that's passed to a Response.Write call. So if you had:
<%# Eval("Foo"); %>
Then it turns into something like:
Response.Write(Eval("Foo"););
See the extra semicoolon inside the () for Response.Write? We don't want that and it might be the source of your compiler error.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/