[Mono-aspnet-list] Why system.web.ui.timer is not fire tick event in mono for asp.net?
enoch
enochchongyk at gmail.com
Thu Mar 24 20:02:17 EDT 2011
In version 2.10.1, i try to do a little bit test on System.Web.UI.Timer to
see if the data will be autoincrement from Session, the thing is everything
is fine, but up to the Tick event, it is not firing... Could Show a working
example... Below is my code, thx for whoever that can give me a solution...
or let mi know am i wrong in some place, a thousand thx.
In Default.aspx.vb
Public Class _Default
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
If Not IsPostBack Then
If Session("Timer1") Is Nothing Then
Session("Timer1") = 1
End If
Label1.Text = Session("Timer1")
End If
End Sub
Protected Sub timer1_Tick(ByVal sender As Object, ByVal e As EventArgs)
Handles timer1.Tick
Session("Timer1") += 1
Label1.Text = Session("Timer1")
End Sub
End Class
In the Default.aspx
<%@ Page Title="" Language="vb" AutoEventWireup="false"
MasterPageFile="~/default.site.0.Master" CodeFile="Default.aspx.vb"
Inherits="_Default" %>
Whereas the designer is
Option Explicit On
Option Strict On
Partial Public Class _Default
Protected Content2 As System.Web.UI.WebControls.Content
Protected sm1 As System.Web.UI.ScriptManager
Protected timer1 As System.Web.UI.Timer
Protected upd1 As System.Web.UI.UpdatePanel
Protected Label1 As System.Web.UI.WebControls.Label
End Class
--
View this message in context: http://mono.1490590.n4.nabble.com/Why-system-web-ui-timer-is-not-fire-tick-event-in-mono-for-asp-net-tp3404115p3404115.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list
mailing list