Click here to Skip to main content
12,249,797 members (60,619 online)
Rate this:
 
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 5: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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160426.1 | Last Updated 9 Dec 2012
Copyright © CodeProject, 1999-2016
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