Hi tanweeruddinb...,
Check this example. Now please take its reference and correct your code.
Class
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
public static class page
{
public static List<string> MyFunction()
{
var retList = new List<string>();
retList.Add("xzy");
retList.Add("abc");
return retList;
}
}
Code
protected void Page_Load(object sender, EventArgs e)
{
List<string> lists = page.MyFunction();
if (lists.Contains("xzy") || lists.Contains("abc"))
{
ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('Available');", true);
}
}