N
Newbie
Dear friends,
I am having a hard time understanding how to use a SELECT CASE in ASP. I
have used it in VB but never in ASP scripting.
Scenerio:
I have 2 textboxes on a form that I have to allow entry to one or the other
or Both at the same time. Now I tried to use an If ElseIf but it got too
hard to track, so now I am using a SELECT CASE Statement.
TEXBOX1 named strEnglish
TEXBOX2 named strFrench
My code:
<%
strEnglish=Request.Form("strEnglish")
strFrench=Request.Form("strFrench")
Select Case
Then I have no idea how to go from here, because I have 2 input textboxes to
follow.
I found this example but I do not know how to apply it to my situation as I
have to folow 2 textbox entries.
<%
UserName=request.form("UserName")
Select Case UserName
Case "Kathi"
Msg = "You deserve a break. Take the day off!"
Case "JD","Anne"
Msg = "Don't forget to call Kathi today!"
Case Else
Msg = "Do I know you?"
End Select
response.write Msg
%>
Can someone please help me out, a known tutorial, perhaps an example or just
plain good ole help please??
Thanks in advance,
~Newbie
I am having a hard time understanding how to use a SELECT CASE in ASP. I
have used it in VB but never in ASP scripting.
Scenerio:
I have 2 textboxes on a form that I have to allow entry to one or the other
or Both at the same time. Now I tried to use an If ElseIf but it got too
hard to track, so now I am using a SELECT CASE Statement.
TEXBOX1 named strEnglish
TEXBOX2 named strFrench
My code:
<%
strEnglish=Request.Form("strEnglish")
strFrench=Request.Form("strFrench")
Select Case
Then I have no idea how to go from here, because I have 2 input textboxes to
follow.
I found this example but I do not know how to apply it to my situation as I
have to folow 2 textbox entries.
<%
UserName=request.form("UserName")
Select Case UserName
Case "Kathi"
Msg = "You deserve a break. Take the day off!"
Case "JD","Anne"
Msg = "Don't forget to call Kathi today!"
Case Else
Msg = "Do I know you?"
End Select
response.write Msg
%>
Can someone please help me out, a known tutorial, perhaps an example or just
plain good ole help please??
Thanks in advance,
~Newbie