SiteMap  | About    

switch case

The switch statement allows you to choose from many statements based on multiple selections by passing control to one of the case statements within its body. The switch statement can include any number of case instances. In VB.Net it is using as Select...Case statement and C# it is using as .
  Select Case expression
	[Case expression list]

End Select

  switch (expression)
	case expression:


The following ASP.NET program evaluates which value is passing in case statement.



<html xmlns="">
<head runat="server">
	<title>Untitled Page</title>
	<form id="form1" runat="server">
		<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
		<br />
		<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

Click the following links to see full source code

C# Source Code
VB.NET Source Code
Default.aspx.vb (C) 2018    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.