asp.net mvc - Passing values in Html.ActionLink -


i new mvc , have novice's knowledge mvc.
creating mvc application, have page displays events taking place in particular time. when select event drop-down list, specific event's details. along specific event's description, need feedback people has entered specific event.
here view :

<div><a href="<%:url.action("managementhome","home")%>">home </a>>> events</div> <br />  <%:html.labelfor(m => m.event)%>  <%:html.dropdownlistfor(m => m.event.selectedvalue, model.event.getselectlist(), new {    id = "eventdropdown"})%> <br /><br />  <div id="result" style="color: green; border: 1px null transparent; "> <%html.renderpartial("~/views/partialviews/eventspartial.ascx"); %> </div>  <%:ajax.actionlink("view", "viewfeedback", "home", new ajaxoptions { updatetargetid = "comments" }, new {eventid=model.event.selectedvalue})%>  <div id="comments" style="color: green; border: 1px null transparent;"> <%html.renderpartial("~/views/partialviews/feedbackpartial.ascx"); %> </div>  

can please suggest how pass event's id in actionlink? in advance

u have use ajax function this:

  $('youractionlinkid').click(function () {           var id = $('#yourdropdownid').val();          $.ajax({              url: this.href,              type: 'get',              data: { id:id },              cache: false,              success: function (result) {                  //do action here              }          });          return false;      }); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -