English 中文(简体)
A. 网上信息框架中的最新表格部分未更新
原标题:UpdatePanel in asp.net webform frame work does not partially update
  <asp:UpdatePanel runat="server" ID="adavanceGrpngLB_UP" UpdateMode="Conditional">
                                <ContentTemplate>
                                    <%--code[@**] 10-Nov-22 code changed Adding Search text box in Target Column Mapping Setting Popup code start--%>
                                    <asp:TextBox ID="search_advgrp" class="form-control form-control-sm mt-1  mr-1 adv_search_col" runat="server" AutoPostBack="false" OnTextChanged="searchFilterTextAdvancedgrp" placeholder="Search Column"></asp:TextBox>
                                    <asp:Button ID="clearListBoxAdvGrp" OnClick="clearSearchTextAdvancedgrp" title="Clear Search" runat="server" Text="x" class="Adv_clr_ser"></asp:Button>
                                    <%--code[@**]10-Nov-22 code changed Adding Search text box in Target Column Mapping Setting Popup code end --%>
                                    <asp:Button runat="server" ID="loadcol" OnClick="Load_advancegroupLB" Style="display: none" />
                                    <asp:ListBox runat="server" ID="adavanceGrpngLB" SelectionMode="Multiple" AutoPostBack="false" Style="max-width: 25em; min-width: 13em; margin-left: 2em; margin-right: .5em; max-height: 60em;"></asp:ListBox>
                                    <asp:Button runat="server" ID="Button3" OnClick="advancegroup_additem_Click" Style="position: absolute; margin-top: 1.1em;" Text=">>" />
                                    <asp:Button runat="server" ID="Button4" OnClick="advancegroup_removeitem_Click" Style="position: absolute; margin-top: 3.2em;" Text="<<" />
                                    <asp:ListBox runat="server" ID="ExadavanceGrpngLB" SelectionMode="Multiple" AutoPostBack="false" Style="max-width: 25em; min-width: 13em; width: 13em; margin-left: 3.1em; max-height: 60em;"></asp:ListBox>
                                    <span>
                                        <%-- <button type="button" id="Button5" runat="server" title="Rename this Rule." style="height: 2.2em !important" class="ml-1 fa fa-angle-double-up" ><i class="fas fa-edit"></i></button>
                                    <button type="button"  id="Button6" title="Delete this Rule." style="heighty: 2.2em !important" class="ml-1 mr-1 btn btn-sm btn-outline-secondary" ><i class="fas fa-trash-alt"></i></button>--%>
                                        <%--                  <asp:Button  runat="server" class="ml-1 fa fa-angle-double-up rotate" ID="group_up" OnClick ="advancegroup_moveup_Click" Text="<<" Style="position: absolute; margin-top: 1.1em;"/>
                                        <asp:Button  runat="server" class=" ml-1 fa fa-angle-double-down rotate" ID="group_down"  OnClick ="advancegroup_movedown_Click" Text=">>" Style="position: absolute; margin-top: 3.2em;"/>--%>
                                        <%--02 July22 code[@*] Button--%>
                                        <asp:Button runat="server" class="ml-1 fa fa-angle-double-up rotate" ID="group_up" OnClick="advancegroup_moveup_Click" Text="▲" Style="position: absolute; margin-top: 1.1em;" />
                                        <asp:Button runat="server" class=" ml-1 fa fa-angle-double-down rotate" ID="group_down" OnClick="advancegroup_movedown_Click" Text="▼" Style="position: absolute; margin-top: 3.2em;" />
                                    </span>
                                </ContentTemplate>                                   
                            </asp:UpdatePanel>
                        </div>**strong text**

实际上,我正在“网上格式”框架中工作。 我的设想是,如果在文字箱中加入一字,就会触发“研究FilterTextAdvancedgrp”,而后者正在TextChange活动。 如果一改AutoPostBack = 真的,它就触发了这一功能,但第1页。 Load也是造成用户厌恶的触发因素。 我想触发OnTextChange,而不用触发页——Load功能。 如果我犯了错误,请纠正我的话,我是新的发展环境。 预先感谢。 下面是密码栏目,是我的奥特图汉事件代码。

 public void searchFilterTextAdvancedgrp(object sender, EventArgs e)
{
    string searchvalueadvgrp = (search_advgrp.Text).Trim(); //length > 0 --->clearSearchTextAdvancedgrp(null, null)
    string[] advgrplistBoxItems = new string[adavanceGrpngLB.Items.Count];
    WriteLog("***Advanced column length " + adavanceGrpngLB.Items.Count);
    WriteLog("Advanced column values" + adavanceGrpngLB.ToString());
    WriteLog(" **********List Items *********" + advgrplistBoxItems.ToString());

    //081123 code[****] - start get target side columns, assign to advancegrouparraylist
    for(int i =0; i< adavanceGrpngLB.Items.Count; i++)
    {
        advancedGroupingArrayList.Add(adavanceGrpngLB.Items[i].ToString());
    }
    //081123 code[****] - end get target side columns, assign to advancegrouparraylist

    //code[@**] 16-Nov-22 code changed clear the textbox value code start
    if (search_advgrp.Text.Length <= 0)
    {
        clearSearchTextAdvancedgrp(null, null);
        return;
    }
    //code[@**] 16-Nov-22 code changed clear the textbox value code end
    List<string> searchListAdv = new List<string>();
    WriteLog("Target Array List " + advancedGroupItems.ToString());
    // 081222 code[**] Ne need to Loop the Data Array List --
    foreach (var item in advancedGroupingArrayList)
    {
        WriteLog("Values " + item.ToString());
        if (item.ToString().ToLower().Contains(searchvalueadvgrp.ToLower())) searchListAdv.Add(item.ToString());
    }
   // --
    //advancedGroupingArrayList
     searchListAdv.Sort();
    foreach (var eachItems in searchListAdv)
    {
        WriteLog("each items values adv " + eachItems.ToString());
        adavanceGrpngLB.Items.Add(eachItems.ToString());
    }
    // Sort the ArrayList Directly --
    //advancedGroupingArrayList.Sort();

    adavanceGrpngLB.DataSource = searchListAdv;
    adavanceGrpngLB.DataBind();

    //--
    // Set the Tooltip After Search
    settooltipLB();//--
                   // 081222 end---
    hidejson.Update();
    WriteLog("===========" + searchListAdv.ToString());
    adavanceGrpngLB_UP.Update();      
}
问题回答

牢记利用更新小组,NOT防止或意味着页面负荷活动不会引发(它将发生)。 牢记在使用更新小组时,定期使用整个网页。

这里正确的术语是,我们称之为部分后页。 这是指当更新小组出现故障时,这一页数活动和整个页数周期。 它可能并不像一个页后发生的情况,但“援外”会发生!

当然,在使用更新小组时,仅凭后面的编码,即可对更新小组区域内的控制进行更新。 这里的想法是,你可以减少回击后页的大小,因为只把部分页面送到服务器,然后返回客户。

因此,尽管经过更新的日内瓦小组的反馈,标准网页活动(如页面负荷活动)将随时进行。

然而,ALWAYS的页面负荷活动每次都对一个简单的纽扣表示。 这意味着设置代码、数据载荷代码和你为建立网页而操作的一般代码?

I can and often should be placed in the page load event, but you need to test if the page is REALLY the first page load.

Thus, 99%, or in fact the last 200 web pages I have built in asp.net webforms?

EVERY ONE has this:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    If Not IsPostBack Then
        LoadGrid
    End If

End Sub

Sub LoadGrid()

    GVHotels.DataSource = MyRst("SELECT * FROM tblHotelsA
                                ORDER BY HotelName")
    GVHotels.DataBind()

End Sub

So, note how we write the page load code event to ONLY run one time, and only on the first real page load. As a general rule, you can t re-load the grid, or even a simple combo box, since if you re-load such data each time, then the user’s choices for those controls will be lost.

Remember, for any button click, or auto post back on ANY control, the page load event fires first and THEN the control events code stub fires.

As a result, it is near impossible to build a working web page without having that all important If Not IsPostBack code stub in the page load event.

This advice applies regardless if you using an update panel or not.

However, as above shows, an update panel on post-back will trigger page load first, and THEN trigger your code stub for the auto post back. Stands to reason then when building a page, your page load event code in near all cases needs to be placed inside of that If Not IsPostBack stub, and this applies to near every page you build - not just ones with update panels.

So, keep in mind that a update panel does not prevent post-backs, but ONLY gives the appearance of no post-back occurring (but, behind the scenes, update panels will and do post-back to the server just like a regular full page post-back).

这里唯一的区别是,只有“部分”的网页贴上服务器。 然而,这一称为“部分”的网页站仍然保持网页活动的完整整个生命周期,包括每页的页负荷活动(和其他活动)。

因此,现在已经指出上述所有内容?

您能够/能够使用自动后台,并在文本箱中为每个关键媒体开一个页后台?

Well, yes, you can, but that s not going to work all that great, since as noted, you STILL then forcing a page post-back with each key pressed.

这是你要求的“隐蔽”情况,但并不是所有这种想法。 正如我所说的那样,每一关键压力都会引发生命周期的形式,而页数将引发,而挪威则支持正在变化的活动。

现在,坦率地说,过去我曾做过吗? 诚然,我的确这样做了,因为我没有真的掌握和技能来写客户的 Java本。 我们经常诉诸更新小组,因为这是一个“避免”的方法,必须写出客户方 Java版,更新网页的部分内容。 在大多数情况下,更新小组确实而且能够去救援。 换言之,更新小组是网络版的天花。

然而,更新小组确实有其局限性,其中一个这样的案例是,每个关键中风点的部分页面后退。 这里并不是所有如此大的想法,因为每个关键媒体都将引发这一页周期,这涉及一个相当沉重的页后(部分),而且你将全程访问服务器。

由于网络服务器、网络浏览器和服务器侧代码都在SAME电脑上运行,这一页后将运行在你的开发箱子上。

这可以给你带来巨大速度的幻觉。 然而,在部署时,你发现,从因特网上的REAL客户台站出来,因此,如果你现在在你的开发箱子上看到的“四舍五入”服务器的“四舍五入”就会放缓。

实际上,从浏览器到服务器的带宽在开发期间并不真正受到限制,但是在部署时。 因此,遭受痛苦或采用卫生组织的网页后退(或部分退后将给每个关键中层造成太多压力。

我建议你放弃更新小组的用户,使用用户方对文本箱的换面活动,并使用网络方法。 虽然更新小组“石油”是你,而且在大多数情况下,你不必写出该客户的 Java本加网络方法? 你的案件就是这种情况,因为你希望实时处理中风。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签