سلام
در قسمت script صفحه که type روی جاوا اسکریپت هستش ما به application و ممبرشیب دسترسی داریم؟
در ضمن صفحه از نوع مسترپیج هستش
مثالا میحوام این کد که الان vb.net رو در قسمت اسکریپت مسترپیجم بنویسم
Dim currentUser As MembershipUser = Membership.GetUser()

Application.Lock()

If (currentUser IsNot Nothing) Then
If (Application(currentUser.UserName) = 1) Then
Application(currentUser.UserName) = Nothing

OnlineUsersManager.DecreaseRegisterUsers()
Else
Application(currentUser.UserName) = CInt(Application(currentUser.UserName)) - 1
End If

Else
If (Application(Request.UserHostAddress) = 1) Then
Application(Request.UserHostAddress) = Nothing

OnlineUsersManager.DecreaseGuestUsers()
Else
Application(Request.UserHostAddress) = CInt(Application(Request.UserHostAddress)) - 1
End If

End If

Application.UnLock()

یا اگه نمیشه میشه در یک تابع بنویسی و در قسمت اسکریپت مسترپیجم فرا بخونم
زیاد جاوااسکریپت بلد نیستم ممنون میشم راهنمایی کنید