Click here to Skip to main content
15,883,731 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!!!

i am trying to use Eval inside a query string but it's not working. It's showing me server tag not well formed. how to make it work ???

<asp:LinkButton runat="server" ID="lnkbtnName" Text='<%#Eval("PName") %>' PostBackUrl="~/Details.aspx?id='<%#Eval("PID") %>'" ></asp:LinkButton>
Posted

Replace your LinkButton code with this:
C#
<asp:linkbutton runat="server" id="lnkbtnName" text="<%#Eval("PName") %>" postbackurl='~/Details.aspx?id=<%#Eval("PID") %>' ></asp:linkbutton>
 
Share this answer
 
v2
try this
C#
PostBackUrl='<%# Eval("SystemEmailID", "Edit_SyatemEmails.aspx?id={0}"
 + "&blogentry=" + Request.QueryString["edit"]) %>'



try this link

http://stackoverflow.com/questions/2460367/want-to-bind-querystring-in-postbackurl-of-imagebutton-in-gridview[^]
 
Share this answer
 
Comments
ujjwal uniyal 23-Jan-12 3:05am    
thanks for the help. it worked.. +5 from me ... :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900