Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
i need to pass values to a drop down list from the database.I gave the static values
in the view as options but whenever they are getting selected the resultant action is not getting performed.
the values are not getting selected dynamically
Could any one please help me out in this.Provide me some sample code or examples on how to pass it
Thanks
Posted
Comments
Sk. Tajbir 18-May-12 2:07am    
Can you give us your code ?
Sahi Pinisetty 18-May-12 2:37am    
yeah sure
I used join query to retriev data from multiple tables
and here Country field is my dropdown

Collapse | Copy Code
if (!string.IsNullOrEmpty(Country))

query = query.Where(j => j.Country == Country);
this is the condition i checked to see if its null or not

Collapse | Copy Code
var results = (from r in query.ToList()
select new
{
Ft = r.Firstname,
Lt = r.Lastname,
Ct = r.City,
Co = r.Country, }).toArray();
this way am passing them
In my view,
var h = myForm.getOptions("Country");//dhtmlx form method
this is what i have done

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