using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Encosia; // This is Postback Ritalin
using System.Threading;
namespace Ritalin_Ajax_Implementation
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSave_Click(object sender, EventArgs e)
{
Thread.Sleep(2000); // This is where we can save to database, for now just using sleep.
txtName.Text = "";
}
protected void btnEnrollment_OnClick(object sender, EventArgs e)
{
Response.Write("Last Enrolled Time: " + DateTime.Now.ToString());
}
protected override void OnPreRender(EventArgs e)
{
MonitoredUpdatePanel enquiryPanel = new MonitoredUpdatePanel();
enquiryPanel.UpdatePanelID = "updatePanelEnquiry"; //Attaching UpdatePanel to be monitored
Encosia.PostBackRitalin pbrControl = new Encosia.PostBackRitalin();
pbrControl.WaitText = "Saving Enquiry...";
pbrControl.MonitoredUpdatePanels.Add(enquiryPanel);
this.Controls.Add(pbrControl); //Adding Postback Ritalin to the page
}
}
}