C# Corner
Tech
News
Videos
Forums
Trainings
Books
Live
More
Interviews
Events
Jobs
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Pass and Get the Query String Value
WhatsApp
Jithil John
Dec 01
2015
1.1
k
0
1
In the First Page:
protected
void
buttonSend_Click(
object
sender, EventArgs e)
{
Response.Redirect(
"PageName.aspx?UserName="
+ txtUserName.Text +
"&Password="
+ txtPassword.Text);
}
In The Second Page
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!IsPostBack)
{
lblUserName.Text = Request.QueryString[
"UserName"
];
lblPassword.Text = Request.QueryString[
"Password"
];
Or
lblUserName.Text = Request.QueryString[0];
lblPassword.Text = Request.QueryString[1];
}
}
String Value
C#
Up Next
Pass and Get the Query String Value