inforakesha

A fine WordPress.com site

Leave a comment

1. Define a partial view like below:

<table>
<tr>
<td>
<label id="lbl1" >test</label>

<input type="text" />
</td>
</tr>
</table>

2:write an action method that will return that partial view
  public ActionResult UpdatePartial()
        {

            return PartialView("_PartialView1");
        }
3:Write this on main view
<script type="text/javascript">

    $(document).ready(function () {

        $.post("/User/UpdatePartial",
               function (data) {
                   $("#partialDropDown").html(data);
               });

    });

</script>

4: define a div with ID=partialDropDown where we will insert the total html of partial view.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s