Graeme Aitken
New member
Having a problem with this IF statment in asp, doesnt seem to work, only the else statment
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
tbxQuotation.Text = "His house was perfect, whether you liked food, or sleep, or work, " & _
"or story-telling, or singing, or just sitting and thinking, best, or a pleasant mixture of them all."
End Sub
Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs)
lblQuotation.Text = tbxQuotation.Text
lblCharacter.Text =tbxCharacter.text
Dim strCharacter As String
strCharacter = tbxCharacter.Text
lblSearchResult.Text = tbxCharacter.text
If (strCharacter = tbxQuotation.Text) Then
lblSearchResult.Text = "Character Found"
Else
lblSearchResult.Text = "Search Result: Not Found"
End If
lblQuotation.Text = tbxQuotation.Text
lblCharacter.Text =tbxCharacter.text
End Sub
can anyone help
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
tbxQuotation.Text = "His house was perfect, whether you liked food, or sleep, or work, " & _
"or story-telling, or singing, or just sitting and thinking, best, or a pleasant mixture of them all."
End Sub
Protected Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs)
lblQuotation.Text = tbxQuotation.Text
lblCharacter.Text =tbxCharacter.text
Dim strCharacter As String
strCharacter = tbxCharacter.Text
lblSearchResult.Text = tbxCharacter.text
If (strCharacter = tbxQuotation.Text) Then
lblSearchResult.Text = "Character Found"
Else
lblSearchResult.Text = "Search Result: Not Found"
End If
lblQuotation.Text = tbxQuotation.Text
lblCharacter.Text =tbxCharacter.text
End Sub
can anyone help