C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




switch


Posted Date: 17 Jul 2008      Total Responses: 1

Posted By: sujatha       Member Level: Silver     Points: 1



int[] j ={ 1, 2 };
switch (j)
{
case 1:
Session["drop"] = "1";
break;
case 2:
Session["text"] = "1";
break;
default:
Session["text"]="";
Session["drop"]="";
break;

the code not working....

pls find the soln





Responses

Author: vipul    17 Jul 2008Member Level: DiamondRating:     Points: 5

hi,
do this way
int[] j ={ 1, 2 };
for (int i = 0; i < j.Length; i++)
{
switch (j.GetValue(0).ToString())
{
case "1":
Session["drop"] = "1";
break;
case "2":
Session["text"] = "1";
break;
default:
Session["text"] = "";
Session["drop"] = "";
break;
}
}

vipul,
http://dongavipul.blogspot.com

Patel Vipul
Web Developer
Ahmedabad ( Gujarat )



Post Reply
You must Sign In to post a response.
Next : Rply BrainstormingGuys ....
Previous : call javascript function from code behind in a for loop
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use