Want to bind querystring in postbackurl of imagebutton in gridview?
Posted
by Sikender
on Stack Overflow
See other posts from Stack Overflow
or by Sikender
Published on 2010-03-17T06:57:17Z
Indexed on
2010/03/17
7:01 UTC
Read the original article
Hit count: 873
Hi ,when i try to databind the '<%#Eval("EntryID") %>' to the ImageButton's postbackurl as
<asp:ImageButton ID="ibtnEdit" runat="server" CommandName="Edit" CommandArgument='<%#DataBinder.Eval(Container.DataItem,"SystemEmailID")%>'
ImageUrl="~/Images/edit-list.gif" PostBackUrl="~/Edit_SyatemEmails.aspx?blogentry=edit&id=<%#DataBinder.Eval(Container.DataItem,"SystemEmailID")%>"/>
it's failed, then i updated the code to
<asp:ImageButton ID="ibtnBlogEntryEdit" PostBackUrl='"~/admin/BlogEntry.aspx?blogentry=edit&entryid=" & <%# Eval("EntryID") %>' SkinID="edit" runat="server" />
well,the above code has pass the debugging,but failed to databind to the postbackurl,the result as
http://localhost/dovoshow/"~/admin/BlogEntry.aspx?blogentry=edit&entryid="%20&%20<%#%20Eval("EntryID")%20%>
so,anyonw know how to solve it ,help me thanks
© Stack Overflow or respective owner