View Single Post
  #2 (permalink)  
Old October 23rd, 2005, 01:06 PM
amouzeshgah amouzeshgah is offline
Registered User
 
Join Date: Jul 2005
Location: doha, , Qatar.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
This code includes Exer4 and Exer5 together:

<script language="vb" runat="server">
Sub Connect(Sender As Object, E As EventArgs)
Select Case txtcall.Text
Case "4581245"
Message.Text = "You are calling Home...."
Case "5662653"
Message.Text = "You are calling Nasrin...."
Case "5703612"
Message.Text = "You are calling Arash...."
Case Else
Message.Text = "You are calling " & txtcall.Text & "..."
End Select
btnDisconnect.Visible = True
End Sub
Sub Disconnect(Sender As Object, E As EventArgs)
txtcall.Text = ""
Message.Text = ""
btnDisconnect.Visible = False
End Sub
</script>
<html>
<head><title>Calling Software</title></head>
<body>
<asp:label id="Message" runat="server" /><br />
<form runat="server">
<h4>Please enter the number you wish to call:</h4>
<asp:textbox id="txtcall" runat="server" /><br /><br />
<asp:Button id="btnConnect" Onclick="Connect" text="Connect" runat="server" />
<asp:Button id="btnDisconnect" text="Disconnect" Onclick="Disconnect" visible=False runat="server" />
</form>
</body>
</html>

Reply With Quote