Sir,
I have going through a function in My ASP.NET Project to fill GridView as per the selection in DropDownList item.
I could not get the proper data because of AutoPostBack fires everytime. i.e the DataValueField and DataTextField value of DropDown always being the value of first row.
Data in DropDownlist are :-
The issue is suppose I select mobile from DropDownList , the AutoPostBack event fires and the value turn from productId 3 to 1 .
the function which I write in c# to load the GridView is :-
Please help me to solve this issue.


Vipan SharmaRank #1,589 · 999 reputationPosted Apr 30, 2016, 1:55 AM EDT
Bineesh ViswanathRank #1,681 · 907 reputationPosted Apr 30, 2016, 1:58 AM EDT
Vipan SharmaRank #1,589 · 999 reputationPosted Apr 30, 2016, 2:03 AM EDT
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Apr 30, 2016, 2:06 AM EDT
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { LoadProductForGridView(); //your function called here }}Nilesh Joshi95 reputationPosted May 6, 2016, 9:47 AM EDT
Hi,
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Apr 30, 2016, 1:46 AM EDT