Кто-нибудь может увидеть, что я здесь делаю не так?страница должна «ДА Это тест»
Partial Public Class testForm1
Inherits System.Web.UI.Page
Private Property test() As String
Get
'if is in session, return it, otherwise look it up
If (IsNothing(Session("test"))) Then
Session("test") = ""
End If
Return Session("test")
End Get
Set(ByVal Value As String)
Session("test") = Value
End Set
End Property
Public ReadOnly Property Istest As Boolean
Get
IIf(test.Contains("yes"), True, False)
End Get
End Property
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
test = "yes"
Response.Write(IIf(Istest, "YES This is a test", "NO testing here"))
End Sub
End Class