我在更新面板中有一个带有网格视图的用户控件。
我试图触发所有网格事件,因为当我在网格视图上工作时,母版页不应该发布,但它不起作用。母版页总是后背!
我可以做什么?
这是 myuser 控制 asp.net 代码:
<asp:UpdatePanel ID="upFeatureCustomer" runat="server" ChildrenAsTriggers="true" >
<ContentTemplate>
<asp:GridView ID="gvFeatureCustomer" runat="server" DataKeyNames="Id"
AutoGenerateColumns="False" ClientIDRowSuffix="Id"
OnRowDataBound="dtgdResult_RowDataBound" ClientIDMode="Static"
ShowHeader="false">
<Columns>
<asp:TemplateField HeaderText="Nome" FooterText="Nome" SortExpression="Name">
<ItemTemplate>
<asp:DropDownList ID="ddlName" ClientIDMode="Predictable" runat="server" DataValueField="id" DataTextField="Name">
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Valore" FooterText="Valore" SortExpression="Value">
<ItemTemplate>
<asp:TextBox id="txtValue" AutoPostBack="true" runat="server" CssClass="auto-feature" OnTextChanged="txtValue_TextChanged"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Delete" FooterText="Delete" Visible="true" HeaderStyle-Width="25"
ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:HyperLink ID="Delete" runat="server" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.Id", "javascript:openDeleteDialog(\"{0}\");")%>'
ImageUrl="~/images/delete2.png" ToolTip="Delete">
</asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="DataBinding" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="DataBound" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="Disposed" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="Init" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="Load" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="PageIndexChanged" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="PageIndexChanging" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="PreRender" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowCancelingEdit" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowCommand" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowCreated" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowDataBound" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowDeleted" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowDeleting" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowEditing" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowUpdated" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="RowUpdating" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="SelectedIndexChanged" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="SelectedIndexChanging" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="Sorted" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="Sorting" />
<asp:AsyncPostBackTrigger ControlID="gvFeatureCustomer" EventName="Unload" />
</Triggers>
</asp:UpdatePanel>
ScriptManager 位于母版页内。谢谢你。