Hi
In Javascript it shows proper hdfdeleteID value , But in lnkRecordDelete_Click it shows "0"
protected void lnkRecordDelete_Click(object sender, EventArgs e)
{
string data = "";
try
{
if (hdfDeleteID.Value != "0")
{
BALBookModuleList bALBookModuleList = new BALBookModuleList();
BookModule RecDel = bALBookModuleList.GetBookModuleById(Convert.ToInt32(hdfDeleteID.Value));
RecDel.InActiveReason = txtDeleteReason.Text.Trim();
RecDel.IsActive = false;
int Res = bALBookModuleList.UpdateBookModule(RecDel);
if (Res != 0)
{
ShowMessage("", "Record Deleted Successfully", "success");
GetData();
}
else
{
ShowMessage("Error", "Record Delete Failed, Please Try Again", "error");
GetData();
}
}
else
{
ShowMessage("Error", "Record Delete Failed, Please Try Again", "error");
GetData();
}
txtDeleteReason.Text = "";
}
catch (Exception ex)
{
Utility.SaveErrorLog(ex.Message, System.IO.Path.GetFileName(Request.Path), System.Reflection.MethodBase.GetCurrentMethod().Name, Convert.ToInt32(hdfLoginCode.Value), data);
ShowMessage("Oops...", ex.Message, "error");
GetData();
}
}
Thanks

Gajendra JangidPosted Apr 3, 2022, 5:43 PM