本文介绍了客户端上的Javascript,Ajax页面刷新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,
我在我的应用程序中处理ASP.NET MVC2.0,XSLT,XML,Javascript,AJAX.我正在开发一个动态的菜单创建模块,在我的网页中,我设计了一个表格来显示添加的新菜单和两个按钮,一个添加新主菜单,一个添加基于主菜单单选的子菜单.
我的问题是,当我添加一个新的主菜单(例如Menu1)并说提交它会显示在网格表上时,当我选择新添加的Menu1的收音机并添加一个子菜单(例如SubMenu1)时,它需要一个以前添加的值作为Menu1,如果我刷新页面之前添加子菜单,则意味着它将采用新添加的值(subMenu1).请任何专家帮助我解决这个问题.

谢谢
Madhusudhan

Hi Friends,
Iam working on ASP.NET MVC2.0,XSLT, XML, Javascript, AJAX in my application. I am developing a dynamic Menu creation module, in my web page I have designed a table to display the new menu which I have added & two buttons, one to add new main menu & one to add Submenu based on the radio selection of main menu.
My problem is, when I add a new main menu (for ex. Menu1) & say submit it wil display on grid table & after when i select radio of newly added Menu1 & add a submenu(fro ex. SubMenu1), it takes a previously added value as Menu1, before adding sub menu if i refresh a page means then it wil take a newly added value( subMenu1). Please can any experts help me in this issue.

Thanks
Madhusudhan

推荐答案

window.location.reload();



这将导致当前Windows页面立即重新加载.

干杯

曼弗雷德(Manfred)



This will cause the current windows page to be reloaded instantly.

Cheers

Manfred


<br />
<% using (Ajax.BeginForm(new AjaxOptions()<br />
        {<br />
            UpdateTargetId = "UpdatingDiv",<br />
            InsertionMode = InsertionMode.Replace,<br />
            HttpMethod = "POST"<br />
        }))<br />
   {%<br />
<br />






然后将控件放在该UpdatingDiv中
希望对您有帮助






and just place your control in that UpdatingDiv
Hope this may help you


这篇关于客户端上的Javascript,Ajax页面刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 13:19