The below mentioned query is correct or not because i am not getting the textbox values.
#txtAFENo. It is textbox id , passing directly the textbox value.
query.RestQuery = "getbytitle('RFA')/Items?$select=ESI_ProjectSeqNoLookup/Id&$expand=ESI_ProjectSeqNoLookup&$filter=ESI_AFENo/Id eq '#txtAFENo'";