I have an application page: ApprovedReassessments with this url :
http://.../Sites/spain/_layouts/pw/ApprovedReassessments.aspx
and I have a library : DropDownLibrary with this url:
http://.../sites/Spain/DropDownLibrary/Forms/AllItems.aspx
when I try to call this library in the application page :
string DROPDOWNLIBRARY_FIELDS = "<FieldRef Name='{0}' /><FieldRef Name='{1}' /><FieldRef Name='{2}' /><FieldRef Name='{3}' /><FieldRef Name='{4}' /><FieldRef Name='{5}' /><FieldRef Name='{6}' /><FieldRef Name='{7}' /><FieldRef Name='{8}' /><FieldRef Name='{9}' /><FieldRef Name='{10}' />";
SPQuery objQuery = new SPQuery();
objQuery.ViewFields = string.Format(DROPDOWNLIBRARY_FIELDS, SharePoint_Assessment_Fields.AGENTID_FIELD, SharePoint_Assessment_Fields.ID_FIELD,
SharePoint_Assessment_Fields.CREATED_FIELD, SharePoint_Assessment_Fields.SALESFORCECASENUMBER_FIELD, SharePoint_Assessment_Fields.COUNTRY_CODE_FIELD,
SharePoint_Assessment_Fields.FILELEAFREF_FIELD, SharePoint_Assessment_Fields.FILEREF_FIELD, SharePoint_Assessment_Fields.ASSESST_STATUS_FIELD,
SharePoint_Assessment_Fields.REVIEWTYPE_FIELD, SharePoint_Assessment_Fields.PAXORCARGO_FIELD, SharePoint_Assessment_Fields.SUBMITTEDDATE_FIELD
);
objQuery.Query = "<Where><And><Eq><FieldRef Name=\"ID\"/><Value Type=\"Integer\">" + salesforceCaseNumber + "</Value></Eq><Eq><FieldRef Name=\"ID\"/><Value Type=\"Integer\">" + agentId + "</Value></Eq></And></Where>";
SPList dropDownList = this.currentWeb.GetList(SPUrlUtility.CombineUrl(this.currentWeb.ServerRelativeUrl, DocumentLibrary.DROPDOWN)); ...
the last line return this error :
cannot complete this action please try again
PS : I have a webpart who call the same library, and it works but not in application page any idea please ?