adiel
unread,Dec 12, 2008, 11:04:40 AM12/12/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Hello, this must be an easy one. I want to perform code based on the
selected item from a radio button in
asp.net. I have the following
code:
// Setup Living Area
switch (true)
{
case radRental.Checked:
livingArea = "Rental Properties Listing";
break;
case radHome.Checked:
livingArea = "Home Property Listing";
break;
case radApartment.Checked:
livingArea = "Apartment Property Listing";
break;
default:
livingArea = "";
break;
}
I am getting an error stating "a constant value is expected" on each
item in the case statement. I know I must be missing a cast or
something, can someone help?
Thanks,
Adiel