Hi jqdesigner,
I have modify your code as per your query. Below is the modify code.
You can write the code in two way.
1. You can convert your ouput result which is coming from GetDesc method to int and then compare as per your condition like below.
int ACount = Convert.ToInt32(GetDesc("select COUNT(Sno) as DocFound from test where RequestID =" + RID + " and RequestStatus ='", "AAA"));
if (ACount == 0)
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>alert(\"Please upload your supporting document.\");</script>", false);
return;
}
2. If you are retriving with string value then you have to do it like below.
string ACount = GetDesc("select COUNT(Sno) as DocFound from test where RequestID =" + RID + " and RequestStatus ='", "AAA");
// You just need to modify here if you are using string type only.
if (ACount == "0")
{
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>alert(\"Please upload your supporting document.\");</script>", false);
return;
}