how to avoid page refersh on clicking alert msg ok button
code is here
protected void btnSend_Click(object sender, EventArgs e)
{
try
{
int intResult = 0;
objBLLCommon = new BLLCommon();
intResult = objBLLCommon.SendingMail(txtToMailId.Text, "", hdnEmailSubject.Value.ToString(), Server.MapPath(hdnEmailFilePath.Value).ToString());
if (intResult > 0)
{
//here is alert msg on clicking ok i dont neeed page refersh bcoz i lost data
Response.Write("");
if (File.Exists(hdnEmailFilePath.Value))
{
File.Delete(Server.MapPath(hdnEmailFilePath.Value));
// rptDoc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Server.MapPath(hdnEmailFilePath.Value));
hdnEmailFlag.Value = "1";
}
}
else
{
Response.Write("");
if (File.Exists(hdnEmailFilePath.Value))
{
File.Delete(Server.MapPath(hdnEmailFilePath.Value));
//rptDoc.ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Server.MapPath(hdnEmailFilePath.Value));
hdnEmailFlag.Value = "1";
}
}
}
Nanhe SiddiquePosted May 28, 2015, 3:22 AM