P
Piz
I've read a previous discussion about the same topic, but there's a
difference.
I call HttpContext.Current.Response.Redirect("file.txt") from a ownmade
sub in the global.asax.
That doesn't works, i'm quite new in asp.net and so i don't know what a
studip mistake i'm doing!!
here there's global asax code:
<%@ Application Language="VB" %>
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub CreateTimer()
Dim myTimer As New System.Timers.Timer()
myTimer.Interval = 3000
myTimer.Enabled = True
AddHandler myTimer.Elapsed, New
System.Timers.ElapsedEventHandler(AddressOf Me.myTimer_Elapsed)
End Sub
Sub myTimer_Elapsed(ByVal sender As System.Object, ByVal e As
System.Timers.ElapsedEventArgs)
HttpContext.Current.Response.Redirect("prova.txt")
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
CreateTimer()
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
End Sub
</script>
difference.
I call HttpContext.Current.Response.Redirect("file.txt") from a ownmade
sub in the global.asax.
That doesn't works, i'm quite new in asp.net and so i don't know what a
studip mistake i'm doing!!
here there's global asax code:
<%@ Application Language="VB" %>
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub CreateTimer()
Dim myTimer As New System.Timers.Timer()
myTimer.Interval = 3000
myTimer.Enabled = True
AddHandler myTimer.Elapsed, New
System.Timers.ElapsedEventHandler(AddressOf Me.myTimer_Elapsed)
End Sub
Sub myTimer_Elapsed(ByVal sender As System.Object, ByVal e As
System.Timers.ElapsedEventArgs)
HttpContext.Current.Response.Redirect("prova.txt")
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
CreateTimer()
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
End Sub
</script>