Trouble using response.redirect
<p>Hi and sorry for my poor english.</p>

<p>I have an Asp.net + Vb.Net application and here is an example of code illustrating my problem : </p>

<p>First I have Default.aspx page with 2 buttons, "Valid" and "Redirect"</p>

<pre><code> Protected Sub butvalid_Click(sender As Object, e As EventArgs) Handles butvalid.Click

    If (File.Exists(Server.MapPath("log.txt"))) Then
        Dim lines() As String = IO.File.ReadAllLines(Server.MapPath("log.txt"))

        Dim tmp As Integer = Convert.ToInt32(lines(lines.Length - 1))
        tmp = tmp + 1

        File.AppendAllText(Server.MapPath("log.txt"), Environment.NewLine &amp; tmp.ToString)
    Else
        File.WriteAllText(Server.MapPath("log.txt"), "1")
    End If

End Sub

Protected Sub Redirect_Click(sender As Object, e As EventArgs) Handles Redirect.Click
    Response.Redirect("accueil.aspx")
End Sub
</code></pre>

<p>Valid button write into a txt file and Redirect is redirecting ...</p>

<p>Here is the page_load code of accueil.aspx : </p>

<pre><code>Threading.Thread.Sleep(3000)
Response.Redirect("default.aspx")
</code></pre>

<p>The problem is when I click on Redirect button in Default.aspx page, the valid button remains accessible and user can click on Valid button.</p>

<p>How can I disable Valid button after Redirect click ?</p>

<p>Thanks in advance.</p>