将日期保存在页面中 [英] save the date in the page

查看:87
本文介绍了将日期保存在页面中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下我在asp.net中有两页(通过c#)(第1页)通过此代码从日历中选择要发送的日期到(第2页)

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);



在aspx



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"];



我遇到的问题,当我关闭第二页时,日期值消失了

如何在第二页中保存日期?因为如果用户每次要使用该系统发送日期都浪费了时间



谢谢
[edit]整理出代码块-OriginalGriff [/edit]



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]

推荐答案

如Sandeep(S Mewara [ ^ ])已经在他对您的答案的评论中指出,您需要某种方式来存储教师(老师)被指派给学生的作业的截止日期,或者更实际地一群学生.通常,到期日期也不会按每个学生应用,而是应用于课程期间发布的集体作业.您可能会发现增加老师或导师为某些或所有学生的到期日的功能很有用.

但是,您必须以一种可以对课程和作业及其各自的到期日以及这些到期日的延长期限(一般而言或基于学生)的方式进行建模.如果没有某种持久层,则重新启动应用程序时所有信息都会丢失.

请仔细考虑您的设计,如果对如何解决此问题有疑问或疑问,请先做一些研究,如果其他所有方法都失败,则需要提出一些可靠的要求.这样,我们可以更轻松地为您提供帮助.

最好的问候,

-MRB
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


这篇关于将日期保存在页面中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆