Click here to Skip to main content
11,640,910 members (67,415 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
i am doing the application in asp.net from default.aspx page value to go to default2.aspx through session how to do?


Design as follows in default.aspx

Name Dropdownlist 1

Id Dropdownlist2

HRA Textbox1 4000

DA Textbox2 2000


Design as follows in default2.aspx

Id dropdownlist1

HRA Textbox1

DA Textbox2


in default2.aspx i want the HRA and DA amt as 4000 and 2000 from default.aspx.

when i click the ID (dropdownlist1) in the default2.aspx i want to retreive the amt of 4000 and 2000 from default.apx .

for that how to write the code through using session.

in asp.net page.please help me.use session only.
Posted 8-Dec-12 20:34pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Default1.aspx :
Session["HRA"] = TextBox1.Text;
Session["DA"] = TextBox.Text;
Default2.aspx :
if("ID" == dropdownlist1.SelectedItem.ToString())
{
   hraLabel.Text = "HRA Value : " + Session["HRA"].ToString();
   daLabel.Text = "HRA Value : " + Session["DA"].ToString();
}
  Permalink  
Comments
Surendra0x2 at 9-Dec-12 2:46am
   
Exactly :)
Krunal Rohit at 9-Dec-12 2:49am
   
TY mate :)
ridoy at 9-Dec-12 4:00am
   
+5
Krunal Rohit at 9-Dec-12 4:04am
   
Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Mika Wendelius 380
1 OriginalGriff 205
2 DamithSL 203
3 Afzaal Ahmad Zeeshan 129
4 CPallini 125
0 Mika Wendelius 380
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 125
4 Afzaal Ahmad Zeeshan 89


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 9 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100