クエリ文字列の問題に直面しています。以下は私のaspコードです
<asp:Label ID="Lable1" runat="server" Text="" ></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
C# コード:
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Lable1.Text += Request.QueryString["refresh"] ;
Response.Redirect("QueryString1t.aspx?refresh=" + 1 + "");
}
私の知る限り、ボタンをクリックするたびにLable1のテキストが変わるはずです。ページの読み込み時に、Lable1 のテキストは何も表示されません。ボタンをクリックすると、最初のクリック 1、2 回目のクリック 11 などのようになります。しかし、期待どおりに表示されません。どこが間違っているのか教えてください。