Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
default.aspx design as follows;
 
username a[textbox1.text]
button (submit)
when i click the submit button in default.aspx page, default2.aspx will open and in that login name default.aspx value to retrieve to that page.how to do?in asp.net
 
default2.aspx design as follows;
 
loginname a[textbox2.text]
 
outputas
 
loginname a to be displayed.what value i type that thing to be displayed in the default2.aspx want to retrieve those value.
Posted 9-Dec-12 6:09am

1 solution

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

Solution 1

In default.aspx:
Session["LoginName"] = loginName;
In default2.aspx:
string loginName = Session["LoginName"] as string;
if (loginName != null)
   {
   ...
   }
 
[edit]Typo: "LoginNmae" changed to "LoginName" - OriginalGriff[/edit]
  Permalink  
v3

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

  Print Answers RSS
0 OriginalGriff 7,205
1 DamithSL 5,114
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,747
4 Kornfeld Eliyahu Peter 4,474


Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 9 Dec 2012
Copyright © CodeProject, 1999-2014
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