How to reload part of main view after submit using ajax -


i'm new mvc. how can refresh part of main view after submit action in 1 of partial views. i'm trying make adding comments. didn't use ajax until good. want after create new comment in partialview "create" appers in partialview getcommentsbyticket...i hope enough explanation...

@model helpdeskapp.models.ticket  @{     viewbag.title = "details"; }  @*<h2>details</h2>*@    <div class="panel panel-green">     <div class="panel-heading">         ticket     </div>     <div class="panel-body">         <div>             @*<h4>ticket</h4>     <hr />*@             <dl class="dl-horizontal">             <dt>             @html.displaynamefor(model => model.ticketid)             </dt>              <dd>             @html.displayfor(model => model.ticketid)             </dd>              <dt>             @html.displaynamefor(model => model.subject)             </dt>              <dd>             @html.displayfor(model => model.subject)             </dd>              <dt>             @html.displaynamefor(model => model.description)             </dt>              <dd>             @html.displayfor(model => model.description)             </dd>              <dt>             @html.displaynamefor(model => model.addeddate)             </dt>              <dd>             @html.displayfor(model => model.addeddate)             </dd>              <dt>             @html.displaynamefor(model => model.category1.name)             </dt>              <dd>             @html.displayfor(model => model.category1.name)             </dd>              <dt>             @html.displaynamefor(model => model.priority1.name)             </dt>              <dd>             @html.displayfor(model => model.priority1.name)             </dd>              <dt>             @html.displaynamefor(model => model.status1.name)             </dt>              <dd>             @html.displayfor(model => model.status1.name)             </dd>              <dt>             @html.displaynamefor(model => model.user.firstname)             </dt>              <dd>             @html.displayfor(model => model.user.firstname)             </dd>              </dl>         </div>         <p>             @*@html.actionlink("edit", "edit", new { id = model.ticketid }) |*@             @html.actionlink("back list", "index")         </p>           <div id="postcomments">             <hr />             <h4>komentari</h4>             @{ html.renderaction("commentsbyticket", "comments", new { ticketid = model.ticketid });}         </div>            <div id="create comments">             @{ html.renderaction("create", "comments", new { ticket = model.ticketid });}         </div>         </div>    </div> <div class="panel-footer">     panel footer </div> </div> 


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -