problem where dropdown list boxes search values are retained from last select even when location dropdown list is not selected. when I am debugging I think the problem is under this code. please give me a solution.
#region ShowSearchOptions
private void ShowSearchResults(Boolean visibility)
{
ibShowSearchOptions.Visible = visibility;
btnShowSearchOptions.Visible = visibility;
pnlSearchCriteria.Visible = !visibility;
panSearchResults.Visible = visibility;
if (visibility && this.gvSearchResults.Rows.Count > 0)
this.imgExcelExport.Visible = visibility;
}
#endregion
K DPosted Oct 14, 2014, 10:20 AM
{
this.Master.ShowSideNavagation = false;
ucGetIndividual.HospitalID = (
Int16)this.UserAccess.HospitalID;
ucLocation.HospitalID =
this.UserAccess.HospitalID;
ucAttendance.HospitalID =
this.UserAccess.HospitalID;
if (!Page.IsPostBack)
{
LoadDropDowns();
this.vsSummary.HeaderText = ErrorHelper.GetErrorMessage("ValidationSummaryHeaderText");
this.cvActionType.ErrorMessage = ErrorHelper.GetErrorMessage("IsRequired").Replace("{FieldName}", "Action date");
//Concatenate the Client ID of Report title Textbox, Group By drop down and Sort by Drop down
btnGenerateReport.Attributes.Add(
"onClick", string.Format("ShowDialog('{0}/PopUpReportViewer.aspx?report=10', '{1}', '{2}', '{3}', '{4}');return false;",
this.ReportPath, tbTitle.ClientID, ddlGroupBy.ClientID, ddlSortBy.ClientID, cbInclude.ClientID));
this.SpellandMaxLimitCheck(this.tbTitle, 100, "Title"); //Spell check
rdpFromDate.SelectedDate =
DateTime.Now;
rdpToDate.SelectedDate =
DateTime.Now;
rfvFromDate.ErrorMessage =
ErrorHelper.GetErrorMessage("IsRequired").Replace("{FieldName}", "From date");
rfvToDate.ErrorMessage =
ErrorHelper.GetErrorMessage("IsRequired").Replace("{FieldName}", "Through date");
cvFromDateToDate.ErrorMessage =
String.Format(ErrorHelper.GetErrorMessage("CompareValidatorErrorMessage"), "From date", "through date");
ddlActionType.SelectedValue = ScheduledStatusTypeID.ToString();
this.gvSearchResults.Attributes.Add("summary", GvSearchCompleteSummary);
this.ucGetIndividual.TXT_CssClass = "textbox";
this.ucGetIndividual.BTN_CssClass = "formInputButton";
this.ucGetIndividual.DDL_CssClass = "dropDown";
this.btnSearch.Attributes.Add("onclick", CommonFunctions.ChangeValidationSummaryDisplayMode(
vsSummary.ClientID,
ValidationSummaryDisplayMode.BulletList.ToString()));
this.btnReports.Attributes.Add("onclick", CommonFunctions.ChangeValidationSummaryDisplayMode(
vsSummary.ClientID,
ValidationSummaryDisplayMode.BulletList.ToString()));
}
}
#endregion
This is page_load code. please help me.
Khan Abrar AhmedPosted Oct 14, 2014, 5:27 AM