asp.net - Listview inside UserControl raises full postback -


I have UserControl and under that control I have the asp: ListView. Inside the ListView I have an asp: LinkButton. When I click on LinkButton, the control picks the full postback, so no matter if the UserControl is inside the UpdatePanel or not.

UserControl:

  & lt; Asp: ListView id = "Lv image" runat = "server" onetime command = "lv image_item command" & gt; & Lt; ItemTemplate & gt; & Lt; Div & gt; & Lt; Asp: image runat = "server" id = "imgImageThumb" ImageUrl = '& lt;% # Eval ("image")%> GenerateEmptyAlternateText = "true" /> & Lt; Asp: LinkButton runat = "server" id = "lbtnImageAdd" CommandName = "Add" CommandEdgement = '& lt;% # Container.DisplayEndex% & gt;' Cause validity = "wrong" text = "add" /> & Lt; / Div & gt; & Lt; ItemTemplate & gt; & Lt; / ASP: ListView & gt;  

Page:

  & asp: UpdatePanel id = "up" runat = "server" & gt; & Lt; ContentTemplate & gt; & Lt; Cuc: UserControl id = "cucUserControl" runat = server / & gt; & Lt; / ContentTemplate & gt; & Lt; / ASP: UpdatePanel & gt;  

Whether you need to set the property to know the update panel Try setting ChildrenAsTrigger = true.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -