Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
@Html.LabelFor(model => model.AlbumId, "Please Album Name")
@Html.DropDownListFor(m => m.albums, Model.albums, "Please Select", new { @id = "albums", @class = "state", @onchange = "javascript:GetSongs(this.value);" })


@Html.LabelFor(model => model.SongId, " Please Select Song ")

<select id="ddlsongs" name="ddlsongs" class="state" ></select>


<input name="songname" type="submit" class="button1" value="Click to generate link"/>
Posted
Comments
[no name] 3-Mar-14 3:29am    
You can get it in javascript method .
And you have already use javascript onchange event for this also.
Otherwise Provide something more information for this
Murali Gowda 3-Mar-14 3:51am    
Have the code enclosed within a form and post it, you will get the model data in controller.
Jameel VM 3-Mar-14 10:32am    
can you post the controller code?

I think you can use form collection parameter in controller in which your all controls value comes at controller.

e.g.
<br />
Public ActionResult test(FormCollection collection)<br />
{<br />
//you can get any value like <br />
collection["input"]<br />
<br />
}
 
Share this answer
 
You can also add a parameter with the name of select tag in your controller like so
C#
public ActionResult Save(string ddlsongs)
{
    //Your code here...
}

where ddlsongs is the name of select tag like the one in your question.
 
Share this answer
 

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