@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="xp.WebForm1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:Timer runat="server" id="UpdateTimer" interval="1000" ontick="UpdateTimer_Tick" /> <asp:UpdatePanel runat="server" id="TimedPanel" updatemod"> <Triggers> <asp:AsyncPostBackTrigger controlid="UpdateTimer" eventname="Tick" /> </Triggers> <ContentTemplate> <asp:Label runat="server" id="DateStampLabel" /> </ContentTemplate> </asp:UpdatePanel> <div> <table> <tr> <td> <span style="color: Red">*</span>Attach Excel file </td> <td> <asp:FileUpload ID="fileuploadExcel" runat="server" /> </td> </tr> <tr> <td></td> <td> <asp:Button ID="btnSend" runat="server" Text="Export" onclick="btnSend_Click" /> </td> </tr> </table> <asp:GridView ID="GridView1" runat="server"> </asp:GridView> </div> </form> </body> </html>
using System; using System.Collections; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.OleDb; using System.Data.SqlClient; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Web.SessionState; using System.Text; using System.Threading; using System.Timers; namespace WebApplication2 { public partial class _Default : System.Web.UI.Page { int Time1 = 1; bool maxTime; System.Timers.Timer timer1 = new System.Timers.Timer(); protected void Page_Load(object sender, EventArgs e) { while (maxTime==true) { Time1 = Time1 + 1; } } protected void btnSend_Click(object sender, EventArgs e) { maxTime = true; <pre lang="cs">Response.Write("hallo"); maxTime = false; } protected void UpdateTimer_Tick(object sender, EventArgs e) { DateStampLabel.Text = Time1.ToString(); Time1++; } } }
while (maxTime==true) { Time1 = Time1 + 1; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)