Click here to Skip to main content
15,921,454 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hi friends i have Dropdown in my partial View (Consider my home page)
C#
@Html.DropDownListFor(model => model.name, new SelectList(new List<Object>{
                   new { value = "gg" , text = name1 },
                   new { value = "hh" , text = name2 },
                   new { value = "jj" , text = name3},
                   new { value = "kk" , text = name4 }
                 }, "value", "text"), new { id = "ddlClass", @class = "field04" })


i called this partial view in my other view to render.
(Consider my sub page)

So when i select a value from main home page in dropdown i cant get the same value in the other view for the same partial view
in my home page i have value setting in my model by while rendering time its not displaying please help me................
Posted
Comments
santhosh-padamatinti 26-Nov-13 6:18am    
How you rendering this partial view(contains drop down) in main view.

1 solution

Your problem is not clear for me.But you can use below mentioned link for get sound knowledge about the drop down list with ASP.net MVC. It shows varies way for bind the data for drop down list.Check that.

Using the DropDownList Helper with ASP.NET MVC

I hope this will help to you.
 
Share this answer
 
v2

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