image 闪烁 c# ajax updatepanel,c# - why controls in updatepanel disappeared? - Stack Overflow

在ASP.NET页面中,遇到一个UpdatePanel奇怪的问题:两个UpdatePanel,一个包含文本框和按钮,另一个包含三个GridView。当点击GridView的“下一页”或搜索按钮后,GridView会消失,只有切换到“TailoredView”标签后才会重新显示。问题可能与UpdateMode设置为'Always'有关。解决方案在于正确处理UpdatePanel的异步更新机制。
摘要由CSDN通过智能技术生成

I have two UpdatePanel(tvUpdatePanel and tvResultUpdatePanel) on one page, as you can see in the image, the first UpdatePanel contains a text box and a button, the second updatepanel contains three GridViews below(For designing purpose, i have to put these two parts seperately). I've set both UpdatePanel's UpdateMode to "Always". I encountered a strange thing: when clicking "next page" of the gridviews or the "search" button, the three Gridviews will disappear from the page. I have to click the "Tailored View" tab then the GridViews show again. The next page or search function are working well. Why is this happening? How to fix this? Thanks!

as6Jz.png

--%>

Complete code search criteria below and click SEARCH button.

Style="display: none; margin-left: 0px; margin-top: 5px"

DataSourceID="geographicalAreaSqlDataSource"

DataTextField="Description"

DataValueField="ID" />

TargetControlID="geographicalAreasDropDownList"

PopupControlID="gaHoverPanel"

PopupPosition="Bottom"

HoverDelay="0"

OffsetX="0"

OffsetY="10"

PopDelay="0">

DataSourceID="newsAreasSqlDataSource"

DataTextField="Description"

DataValueField="ID"

Style="display: none; margin-left: 60px; margin-top: -15px" Width="200px" />

TargetControlID="newsAreasDropDownList"

PopupControlID="naHoverPanel"

PopupPosition="Bottom"

OffsetX="0"

OffsetY="10"

PopDelay="0">

οnkeypress="return UserPressKeyOnTVTB(event);"

Style="margin-left: 0px; margin-top: -20px" Width="650px" />

TargetControlID="tvSearchTbx"

PopupControlID="stHoverPanel"

PopupPosition="Bottom"

OffsetX="20"

OffsetY="10"

PopDelay="0">

--%>

ConnectionString=""

SelectCommand="STP_GetGeographicalAreas"

SelectCommandType="StoredProcedure">

ConnectionString=""

SelectCommand="STP_GetNewsAreas"

SelectCommandType="StoredProcedure">

Loading data, please wait...

Topic Codes

OnSelectedIndexChanged="TopicCodesGridView_SelectedIndexChanged"

OnPageIndexChanging="TopicCodesGridView_PageIndexChanging"

Style="margin-top: 3px; table-layout: fixed; max-width: 100%;"

OnRowDataBound="TopicCodesGridView_RowDataBound"

AllowSorting="True"

AutoGenerateColumns="false"

AllowPaging="True" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellSpacing="2">

--%>

Topic Tree View

  • Folder0

    • Child 0

    • Child 1

    • Child 2

    • Child 1

    • Child 4

    • Child 5

    • Child 2

    • Child 1

    • Child 2

    • Child 3

    • Child 4

    • Child 5

    • Folder 1

      • child child 00

      • Child 4

      • child child 01

      • Child 4

      • Folder 2

        • file 0000

        • file 0000

Recurring Reports

Style="margin-top: 3px; table-layout: fixed; max-width: 100%;"

OnRowDataBound="RecurringReportsGridView_RowDataBound"

AllowSorting="True" AutoGenerateColumns="False" AllowPaging="True" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellSpacing="2">

TypeName="TR.News.RDWS.SearchTool.DataManager.DataManagerRepository"

OldValuesParameterFormatString="original_{0}"

SelectMethod="GetCompanyRics4TailoredView">

SelectMethod="GetTopicCodes4TailoredView"

OldValuesParameterFormatString="original_{0}"

TypeName="TR.News.RDWS.SearchTool.DataManager.DataManagerRepository">

SelectMethod="GetRecurringReports4TailoredView"

OldValuesParameterFormatString="original_{0}"

TypeName="TR.News.RDWS.SearchTool.DataManager.DataManagerRepository">

Select primary geographical area of interest

Select primary news area of interest

Enter keywords in English that relate to your news area of interest

Company RICs

Style="table-layout: fixed; max-width: 100%;"

OnRowDataBound="CompanyRicsGridView_RowDataBound"

AllowSorting="True" AutoGenerateColumns="False" AllowPaging="True" BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellSpacing="2">

CommandArgument="" runat="server" />

--%>

`enter code here`

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值