Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2008, 01:58 AM
Authorized User
 
Join Date: Jul 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to gaurav gupta
Default apply if condition at session


public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string s17 = Request.Form["scheck"].ToString();
        scheck.Value = s17;
        Response.Write(s17);
        string s18 = Request.Form["sacc1"].ToString();
        sacc1.Value = s18;
        Response.Write(s18);
        string s19 = Request.Form["schild"].ToString();
        schild.Value = s19;
        Response.Write(s19);
        string s = Session["child"].ToString();
        //Response.Write(s);
        //Response.Write(s19);int.Parse(Request.Form["schild"])==1

        if (int.Parse(s19)== 1)
        {
            Session["a"] = ctcchild1.name;
            Session["b"] = ctcchild1.age;
            Session["c"] = ctcchild1.college;
        }
        else if (int.Parse(s19)==2)
        {
            Session["d"] = ctcchild2.name;
            Session["e"] = ctcchild2.age;
            Session["f"] = ctcchild2.college;
        }
        //else
        //{
       else if (2<int.Parse(s19) <= 3)(error)
   {
            Session["g"] = ctcchild3.name;
            Session["h"] = ctcchild3.age;
            Session["i"] = ctcchild3.college;
        }
        else if(int.Parse(s19) == 4)
        {
            Session["j"] = ctcchild4.name;
            Session["k"] = ctcchild4.age;
            Session["l"] = ctcchild4.college;
        }
plz tell me is it possible to apply condition at session .and how it is possible






Similar Threads
Thread Thread Starter Forum Replies Last Post
Question on Apply Template vvenk XSLT 7 July 10th, 2008 12:21 PM
how to apply condition at session value gaurav gupta ASP.NET 2.0 Basics 0 July 9th, 2008 01:29 AM
CANNOT APPLY INDEXING WITH [] pallone .NET Framework 2.0 7 April 8th, 2008 06:40 AM
Apply changes to more than one file bcogney XML 11 March 6th, 2007 07:02 PM
Templates Won't Apply neilac333 XSLT 5 October 26th, 2006 01:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.