Click here to Skip to main content
15,905,913 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I want to ask I have two pages in asp.net ( by c#) (page 1) send the date by choose from calendar to (page 2) by this code
Response.Redirect("tpage2.aspx?Name=" + TextBox1.Text);


in aspx

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

                <asp:CalendarExtender ID="CalendarExtender1" runat="server"
                    TargetControlID="TextBox1" Enabled="True"/>
                  <asp:Label ID="Label1" runat="server" Text="Date "></asp:Label>


and the second page code is

if (Request.QueryString["Name"] != null)
               Label1.Text = Request.QueryString["Name"];


the problem that I have ,when I closed the second page the value of the date is disappeared

how can I save the date in second page ? because it is wasted time if the user send the date each time want to use the system



thanks
[edit]Codeblocks sorted out - OriginalGriff[/edit]
Posted
Updated 31-May-11 8:20am
v2
Comments
Sandeep Mewara 31-May-11 14:21pm    
What do you mean by save data even after browser close? If you want to persist it across the sessions, you need to use some way to save it externally like a database or a file where from you can pick it next time. Was not sure if you were looking for that or not so posting it as a comment.\

So, in case, this was not what you were looking for, kindly edit the question and clarify more.
dedoooo 31-May-11 14:40pm    
Ok.To more clarify.Two pages are admin by two diffrent users

user 1 ( Teacher) who send the date of submiting the Homework.( the date send from page one)

user 2 ( Student) who receive the submitting date in his page

When the teacher send the date ,the student page must keep the date ,to show it by the student each time the student open his page.

I hope that understand and thanks for the help

1 solution

As Sandeep (S Mewara[^]) already pointed out in his comment to your answer, you need some way of storing the due date of the assignement a teacher (tutor) appointed to a student or to be more realistic to a group of students. Usually a due date would also not be a applied on a per student basis but rather to a collective assignement that is issued during a course. You might find it useful to add the ability that a teacher or tutor might expand the due date for some or all of the students.

Nevertheless you must model your application in a way where courses and assignements with their respective due dates and prolongment of these due dates in general or on a student basis can be persisted. Without some kind of persistance layer all information would be lost when the application is restarted.

Please think over your design and if you have questions or doubts on how to solve this, please do some research first and if all else fails come back with some solid requirements. That way it will be so much easier for us to help you.

Best regards,

-MRB
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900