本文介绍了ASP.NET页面内实施3个不同的div脏指标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个唯一的格式这使得三jQuery的范围内有三个 DIV 秒的ASP.NET页面UI选项卡。所有三个标签有输入 S中的被提交给单独的Web方法和/或秒。

I have an ASP.NET page that has three divs within the only form which renders as three jQuery ui tabs. All the three tabs have inputs and/or selects that gets submitted to separate web methods.

在标签中选择一个有两个输入类型第提交,即触犯<$ C $后重定向C>表格到另一页。同步编辑是可能的所有三个选项卡,因此有必要实行某种形式的脏的(部分脏宁)指标的形式。

On tab one there are two inputs of type submit, that redirects after committing the form to another page. Simultaneous edits are possible on all the three tabs, and therefore there is a need to implement some kind of form-dirty (section-dirty rather) indicators on the form.

用户需要在提交与OK重定向-提交/取消提示符之前被警告。

The user needs to be warned before committing the redirecting-submits with an OK/Cancel prompt.

科级脏指标应分别复位,sectionwise。

The section level dirty indicator should be resettable separately, sectionwise.

该DirtyForm jQuery插件看起来良好的开端,但希望听到关于这种方法的任何警告。

The DirtyForm jQuery plugin looks a good place to start, but wanted to hear about any caveats of this approach.

已经有人做过这样的事?谢谢

Has someone done anything like this? Thanks

推荐答案

我一直在做类似的事情,还用DirtyForm插件,它一直伟大的工作。我们基本上只是绑定脏净的事件是这样的:

I've been doing something similar, also using the DirtyForm plugin and it's been working great. We'll basically just bind the dirty and clean events like this:

    $(".section").dirty_form().dirty(function(event, data) {
        $(".indicator").addClass('dirty');
    }).clean(function(event, data) {
        $(".indicator").removeClass('dirty');
    });

在它的设置中,我们将重点每个没有通过验证之前提交部分。我敢肯定,你可以做同样的事情,只是把警报,而不是添加脏类。

After it's setup, we'll highlight each section that doesn't pass validation before the submit. I'm sure you can do something similar and just put alerts instead of adding dirty classes.

这篇关于ASP.NET页面内实施3个不同的div脏指标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 16:20