0

Is there any reason why an if then statement would fire regardless:

Its inside my Page_load:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Dim a As New Clicks
    If Request.QueryString("u") IsNot Nothing Then
        a.Click(Request.QueryString("u"), Request.ServerVariables("REMOTE_ADDR"), Request.ServerVariables("HTTP_USER_AGENT"))
        Response.Redirect(urls.GetURL(Request.QueryString("u")))
    End If
End Sub

As a result, I am get 126 instances of a.Click per page load when "u" isnt present?

I have tried to move to other Page Events but same result

4

1 回答 1

0

Created a workaround by encasing if statement in the original if statement to capture the unwanted items.

Not the perfect solution but is working

于 2012-09-17T07:59:08.710 回答