Append QueryString To PostBackUrl Attribute In ASP.NET Web Forms LinkButton Control Inside GridView Control
There was a question raised in the forum on how to append query string to a PostbackUrl attribute in an ASP.NET LinkButton inside the template field of a GridView control.
To answer that, one possible solution is to set the PostBackUrl with String.Format() method where you can include the desired query string of that url.
To answer that, one possible solution is to set the PostBackUrl with String.Format() method where you can include the desired query string of that url.
1 2 3 4 | <asp:LinkButton ID="lnkProductPage" runat="server" PostBackUrl='<%# String.Format("ProductPage.aspx?Id={0}", Eval("ID"))%>' CausesValidation="false" Text='<%# Eval("ID")%>'> </asp:LinkButton> |
Comments
Post a Comment