1. Construct URL search parameters
String strsearch = string. empty;
If (this. dropdistrict. selectedindex! = 0)
{
Strsearch + = string. Format ("{0} = '{1}'", (user. userid. substring (230000) = ")? "City": "District", dropdistrict. selectedvalue );
}
If (dropfqualiclassid. selectedvalue! = "0 ")
{
Strsearch + = string. Format ("and fqualiclassid = '{0}'", dropfqualiclassid. selectedvalue );
}
If (this. dropfqualinclassid. selectedvalue! = "0 ")
{
Strsearch + = string. Format ("and fqualinclassid = '{0}'", dropfqualinclassid. selectedvalue );
}
If (dropfqualification. selectedvalue! = "0 ")
{
Strsearch + = string. Format ("and fqualification = '{0}'", dropfqualification. selectedvalue );
}
If (txtentername. Text. Trim ()! = "")
{
Strsearch + = string. Format ("and fname like '% {0} %'", txtentername. Text. Trim ());
}
If (this. dropfyear. Visible)
{
Strsearch + = string. Format ("and fyear = '{0}'", dropfyear. selectedvalue. Trim ());
}
If (this. dropfquarter. Visible)
{
Strsearch + = string. Format ("and fquarter = '{0}'", dropfquarter. selectedvalue. Trim ());
}
If (strsearch. length> 5 & strsearch. substring (0, 5) = "and ")
{
Strsearch = strsearch. Remove (0, 5 );
}
If (strsearch. length> 0)
{< br> response. Redirect (string. Format ("Enterprise/approvelist. aspx? Strsearch = {0} ", strsearch);
}< br> else
{< br> response. redirect ("Enterprise/approvelist. aspx ");
}< br> 2, approvelist. aspx receives search parameters and performs search
If (request. querystring ["strsearch"]! = NULL)
{< br> datatable dttemp = DT. copy ();
DT. rows. clear ();
dt = filterbind (dttemp, request. querystring ["strsearch"]. trim ();
}