如何使用C#在asp.net中为在线考试创建秒表 [英] how to create stop watch for on line exam in asp.net with C#

查看:67
本文介绍了如何使用C#在asp.net中为在线考试创建秒表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在asp.net中编写一个在线考试模块,请发送停止代码...

解决方案

你必须使用upadte panel ajax control。 ...和ajax计时器...将计时器的间隔设置为1秒...并且在计时器刻度事件中你必须编码.....通过以下文章

http://www.dotnetspider.com/forum/304722-Creating-Stop-Watch -using-Asp.Net-C.aspx [ ^ ]


< div> < asp:ScriptManager ID =ScriptManager1runat =server> < / ASP:的ScriptManager> < asp:UpdatePanel ID =UpdatePanel1runat =server> <&的ContentTemplate GT; < asp:Timer ID =Timer1runat =serverOnTick =Timer1_Tick> < / ASP:定时器和GT; < br /> < br /> < br /> < asp:Label ID =Label1runat =serverText =00:00>< / asp:Label> < asp:Button ID =Button1runat =serverText =StartOnClick =Button1_Click/> < asp:Button ID =Button2runat =serverText =ResetOnClick =Button2_Click/> < /&的ContentTemplate GT; < / ASP:UpdatePanel的> < / DIV> 


i am devolving a on line exam module in asp.net please send code for stop watch...

解决方案

you have to use upadte panel ajax control ....and ajax timer...set interval of timer to 1 sec ...and on timer tick event you have to code .....go through following article
http://www.dotnetspider.com/forum/304722-Creating-Stop-Watch-using-Asp.Net-C.aspx[^]


<div>        <asp:ScriptManager ID="ScriptManager1" runat="server">        </asp:ScriptManager>        <asp:UpdatePanel ID="UpdatePanel1" runat="server">            <ContentTemplate>                <asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick">                </asp:Timer>                <br />                <br />                                <br />                <asp:Label ID="Label1" runat="server" Text="00:00"></asp:Label>                <asp:Button ID="Button1" runat="server" Text="Start" OnClick="Button1_Click" />                <asp:Button ID="Button2" runat="server" Text="Reset" OnClick="Button2_Click" />            </ContentTemplate>        </asp:UpdatePanel>    </div>


这篇关于如何使用C#在asp.net中为在线考试创建秒表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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