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

Sanjeeb LenkaRank #301 · 8.3K reputationPosted May 27, 2015, 10:57 PM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted May 27, 2015, 11:00 PM EDT
Hema Latha41 reputationPosted May 27, 2015, 11:07 PM EDT
Nanhe SiddiqueRank #1,103 · 1.7K reputationPosted May 27, 2015, 11:22 PM EDT