Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello frnds,

i m using link button and want to redirect page with some value.

code is as beleow

XML
<asp:DataList ID="DataList1" runat="server">
        <ItemTemplate>
            <div>
                <asp:Image ID="img" runat="server" ImageUrl='<%#Eval("id") %>' />
                <br />
                <br />
                <asp:LinkButton ID="lbtn" runat="server" Text='<%#Eval("name") %>' PostBackUrl="imagepage.aspx?v=<%#Eval("id") %>"></asp:LinkButton>
            </div>
        </ItemTemplate>
    </asp:DataList>


but the error is server tag is not well formed....please help me..

thanx in advance...
Posted

1 solution

Try:
ASP.NET
<asp:LinkButton ID="lbtn" runat="server" Text='<%#Eval("name") %>' PostBackUrl='imagepage.aspx?v=<%#Eval("id") %>' />


Best regards
Espen Harlinn
 
Share this answer
 
v2
Comments
bbirajdar 15-Apr-12 11:14am    
Yes this one should work..He was missing the 'close' tag in the code.. My 5
Espen Harlinn 15-Apr-12 11:16am    
Thanks :-D
VJ Reddy 19-Apr-12 20:06pm    
Good correction. +5
Espen Harlinn 20-Apr-12 2:42am    
Thank you VJ :-D

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