TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
rahul patil
NA
160
8.5k
how to display data one page to last(third page) in asp.net
May 9 2020 12:15 AM
I want to first page data display on last page
problem is first page data is not pass the last page give an error
object referance not set to an object
PersonalDetail.aspx
1 page
<form id=
"form1"
runat=
"server"
>
<h1 style=
"text-align: center"
>Personal Information:</h1>
FirstName:<asp:TextBox ID=
"txtFirstName"
runat=
"server"
></asp:TextBox>
<asp:RequiredFieldValidator ID=
"RequiredFieldValidator1"
runat=
"server"
ErrorMessage=
"Please Enter Your Name"
ControlToValidate=
"txtFirstName"
ForeColor=
"Red"
></asp:RequiredFieldValidator>
<div style=
"margin-left: 5px"
></div>
LastName:<asp:TextBox ID=
"txtLastName"
runat=
"server"
></asp:TextBox>
<asp:RequiredFieldValidator ID=
"RequiredFieldValidator2"
runat=
"server"
ErrorMessage=
"Please Enter Your LastName"
ControlToValidate=
"txtLastName"
ForeColor=
"Red"
></asp:RequiredFieldValidator>
<div style=
"margin-left: 5px"
></div>
Date Of Birth:<asp:Calendar ID=
"txtcalender"
runat=
"server"
></asp:Calendar>
<div style=
"text-align:center"
>
<asp:Button ID=
"Button1"
runat=
"server"
Text=
"Next"
OnClick=
"Button1_Click"
/>
</div>
</form>
PersonalDetail.aspx.cs
protected
void
Button1_Click(object sender, EventArgs e)
{
Response.Redirect(
"ContactInformation.aspx?FirstName=&LastName=&DateofBirth="
+ txtFirstName.Text +txtLastName.Text + txtcalender.SelectedDate);
}
contactinformation.aspx
2 page
<form id=
"form1"
runat=
"server"
>
<h1 style=
"text-align: center"
>Contact Information:</h1>
EmailId:<asp:TextBox ID=
"txtEmailid"
runat=
"server"
></asp:TextBox>
<asp:RequiredFieldValidator ID=
"RequiredFieldValidator1"
runat=
"server"
ErrorMessage=
"Please Enter Your EmailId"
ControlToValidate=
"txtEmailid"
ForeColor=
"Red"
></asp:RequiredFieldValidator>
<div style=
"margin-left: 5px"
></div>
MobileNo:<asp:TextBox ID=
"txtMno"
runat=
"server"
></asp:TextBox>
<asp:RequiredFieldValidator ID=
"RequiredFieldValidator2"
runat=
"server"
ErrorMessage=
"Please Enter Your MobileNo"
ControlToValidate=
"txtMno"
ForeColor=
"Red"
></asp:RequiredFieldValidator>
<div style=
"margin-left: 5px"
></div>
Password:<asp:TextBox ID=
"txtPass"
runat=
"server"
TextMode=
"Password"
></asp:TextBox>
<asp:RequiredFieldValidator ID=
"RequiredFieldValidator3"
runat=
"server"
ErrorMessage=
"Please Enter Your Password"
ControlToValidate=
"txtPass"
ForeColor=
"Red"
></asp:RequiredFieldValidator>
<div style=
"margin-left: 5px"
></div>
<div style=
"text-align:center"
>
<asp:Button ID=
"Button1"
runat=
"server"
Text=
"Submit"
OnClick=
"Button1_Click"
/>
</div>
</form>
contactinformation.aspx.cs
protected
void
Page_Load(object sender, EventArgs e)
{
string FirstName = Request.QueryString[
"FirstName"
].ToString();
string LastName = Request.QueryString[
"LastName"
].ToString();
string DateofBirth = Request.QueryString[
"DateofBirth"
].ToString();
}
protected
void
Button1_Click(object sender, EventArgs e)
{
Response.Redirect(
"DisplayPage.aspx?EmailId=&MobileNo="
+ txtEmailid.Text + txtMno.Text);
}
DisplayPage.aspx.cs
3 Page
protected
void
Page_Load(object sender, EventArgs e)
{
string FirstName = Request.QueryString[
"FirstName"
].ToString();
here give the error object referance not set to an object
string LastName = Request.QueryString[
"LastName"
].ToString(); here give the error object referance not set to an object
string DateofBirth = Request.QueryString[
"DateofBirth"
].ToString();
here give the error object referance not set to an object
string EmailId = Request.QueryString[
"EmailId"
].ToString();
string MobileNo = Request.QueryString[
"MobileNo"
].ToString();
Response.Write(FirstName);
Response.Write(LastName);
Response.Write(DateofBirth);
Response.Write(EmailId);
Response.Write(MobileNo);
}
display the personal information data and contact information data display on the last page(DisplayPage.aspx.cs)
Reply
Answers (
20
)
represent bar chart data depending on dropdown menu
submit data in mvc