Click here to Skip to main content
15,882,113 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to bind a dropdownlist inside a gridview in a user control where the parameter will be change for every page ? how to handle it with a .aspx page?
Posted
Comments
NaibedyaKar 15-Oct-14 5:24am    
What do you mean by "according to the page required"
Ajay Kumar 15-Oct-14 6:00am    
I mean that if i use this user control in a page name like "financial.aspx", at that time the dropdownlist will bind with "financialcriteria" or if i use it in "salary.aspx" it will bind with "salarycriteria" ,actually i want to bind the dropdownlist dynamically from different .aspx page.

1 solution

Hi Ajay, I think you want to bind the dropdown to the Gridview. I believe it will be the same way as you do it on a page or user control. Check the below links,

http://www.aspsnippets.com/Articles/How-to-populate-DropDownList-in-GridView-in-ASPNet.aspx[^]

http://www.dotnetfox.com/articles/how-to-use-dropdownlist-control-to-gridview-in-Asp-Net-using-C-Sharp-1020.aspx[^]
 
Share this answer
 
Comments
Ajay Kumar 15-Oct-14 4:33am    
Thank you @NaibedyKar, for your suggestion. Yes you r right i want to bind the dropdownlist into gridview in a user control . But i also want to bind this dropdownlist with different data source according to the page required .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900