protected void Page_Load(object sender, EventArgs e)
 {
     Label5.Text = Request.Cookies["Firstpagdetails"]["name"];
     Label7.Text = Request.Cookies["Firstpagdetails"]["name"];
     Label8.Text = Request.Cookies["Firstpagdetails"]["accntnum1"];
     Label9.Text = Request.Cookies["Firstpagdetails"]["acctnum2"];
     String acc1 = Request.Cookies["Firstpagdetails"]["accntnum1"];
     Controller cntrl =new Controller();
     Button1.Text = cntrl.checkbankNameforAccount(acc1);
     String acc2 = Request.Cookies["Firstpagdetails"]["acctnum2"]; ;
     Button2.Text = cntrl.checkbankNameforAccount(acc2);
 }
        protected void Button1_Click(object sender, EventArgs e)
        {
            Controller contrl = new Controller();
            String accounts = contrl.connectusingentity(TextBox1.Text, TextBox2.Text);
            char a = ',';
            String name = " ";
            String acc1id = " ";
            String acc2id = " ";
            String[] acc1 = accounts.Split(a);
            if (acc1.Count() == 5)
            {
                Label4.Text = acc1[0];
                Label5.Text = acc1[1];
                acc1id = acc1[2];
                acc2id = acc1[3];
                name = acc1[4];

            }
            else
            {
                Label4.Text = acc1[0];
                Label5.Text = "NA";
                acc1id = acc1[1];
                acc2id = "NA";
                name = acc1[2];

            }

            HttpCookie cokies = new HttpCookie("Firstpagdetails");
            cokies.Values.Add("accntnum1", acc1id);
            if(acc2id!="NA")
            cokies.Values.Add("acctnum2", acc2id);
            cokies.Values.Add("name", name);
            Response.Cookies.Add(cokies);

            Response.Redirect("WebForm2.aspx");
        }