First time my grid view is populated as intended filtering records based on selected value of dropdownlist . But on paging grid view is populated with total records in database ie., gridview is not displayed with filtered condition of dropdownlist selected value. Please help me
abmk says: String ddlToGrid = string.Empty;
String ddlToGrid = string.Empty;
String ddlToGrid =
string
.Empty;
You need to make ddlToGrid variable as static. Because on each postback it becames string.Empty
Once you make it static the value retain on each postback.
static string ddlToGrid = string.Empty;
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.