我有以下代码:添加获取变量(查询字符串)到一项PostBackUrl在FormView控件asp.net
<asp:Button ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Add Form"
PostBackUrl="~/APPLICATION/FormView.aspx?postquestion="/>
我使用FormView控件。
我需要为PostBackUrl添加Request.QueryString [“postquestion”]变量为“FormView.aspx?postquestion =”。
我发现净下面的代码,但它不工作:
PostBackUrl='<%# ="~/APPLICATION/FormView.aspx?postquestion=" + Request.QueryString ["postquestion"].ToString() %>'
感谢您的帮助!
当你说“它不工作”,发生了什么?有没有错误? – Ste