开发者

WebMatrix - Partial View Updates

开发者 https://www.devze.com 2023-03-15 05:17 出处:网络
I have a simple default page that renders 3 different content pages. <div style=\" float:left;\">

I have a simple default page that renders 3 different content pages.

<div style=" float:left;">
    @RenderPage("/Content/AddCounty.cshtml")
    </div>
    <div style=" float:left;width:300px;">
    @RenderPage("/Content/AddTown.cshtml")
    </div> 
    <div style=" float:none;width:300px;">
    @RenderPage("/Content/AddCompany.cshtml")
    </div>

These 开发者_开发百科pages have kind of same fields like id, text_name. All of them have forms in it with Post method and submit button. how to achieve partial update as we used to do in asp.net ?

your help will be appreciated.

Thanks, Talha


Use jQuery to post the form values and update the DOM. Have a look at the jQuery Post API

0

精彩评论

暂无评论...
验证码 换一张
取 消