I can put objects of the same ID in each role in the outer updatepanel but when i do the same thing for the inner updatepanel i get the following error ...
The type '_Default' already contains a definition for 'GridView1'
I should note that it works perfect for the first role (outer + inner) and everything is fine but its when you implement the inner updatepanel for the rest of the roles is when you get the error for the inner updatepanel(The
type '_Default' already contains a definition
for'GridView1' ).
Ended up using a formview inside updatepanel2 for each role and using an objectdatasource and populating the databounded fields with this command <%# Eval("FieldName") %>
chjones2008
Member
258 Points
168 Posts
UpdatePanel inside UpdatePanel
Feb 07, 2013 04:39 PM|LINK
I have several roles inside a LoginView and I have an outer updatepanel with an inner update panel.
chjones2008
Member
258 Points
168 Posts
Re: UpdatePanel inside UpdatePanel
Feb 07, 2013 10:45 PM|LINK
I should note that it works perfect for the first role (outer + inner) and everything is fine but its when you implement the inner updatepanel for the rest of the roles is when you get the error for the inner updatepanel(The type '_Default' already contains a definition for 'GridView1' ).
chjones2008
Member
258 Points
168 Posts
Re: UpdatePanel inside UpdatePanel
Feb 08, 2013 07:23 PM|LINK
Ended up using a formview inside updatepanel2 for each role and using an objectdatasource and populating the databounded fields with this command <%# Eval("FieldName") %>
<asp:Panel ID="pnlComments" runat="server" Visible="false" Height="25%" ScrollBars="Vertical"> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer_Tick"> </asp:Timer> <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDatasource1" AllowPaging="true" EnableViewState="false" Width="100%"> <ItemTemplate> <table width="100%" align="center"> <tr> <td style="width:5%; visibility:hidden;" align="center"> <h3> <%# Eval("ID") %> </h3> </td> <td style="width:10%;" align="center"> <h3> <%# Eval("Name") %> </h3> </td> <td style="width:75%;" align="center"> <h3> <%# Eval("Comment") %> </h3> </td> <td style="width:5%; visibility:hidden;" align="center"> <h3> <%# Eval("Record") %> </h3> </td> <td style="width:5%;" align="center"> <h3> <%# Eval("Date") %> </h3> </td> </tr> </table> </ItemTemplate> </asp:FormView> </ContentTemplate> </asp:UpdatePanel> <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData" TypeName="CommentsTableAdapters.tblCommentsTableAdapter"> <InsertParameters> <asp:Parameter Name="ID" Type="Int32" /> <asp:Parameter Name="Name" Type="String" /> <asp:Parameter Name="Comment" Type="String" /> <asp:Parameter Name="Record" Type="Int32" /> <asp:Parameter Name="Date" Type="String" /> </InsertParameters> <SelectParameters> <asp:ControlParameter ControlID="obsNum" Name="Record" PropertyName="Text" /> </SelectParameters> </asp:ObjectDataSource> <table width="100%" align="center"> <tr> <td style="width:95%;"> <asp:TextBox ID="Comment" runat="server" Width="100%"></asp:TextBox> </td> <td style="width:5%;"> <asp:Button ID="CloseComments" runat="server" Text="X" style="float:right;" OnClick="Close_Comments" /> </td> </tr> <tr> <td> <asp:Button ID="Submit" runat="server" Text="Submit" style="float:right;" OnClick="Submit_Comment" /> </td> </tr> </table> </asp:Panel>Amy Peng - M...
Star
11787 Points
1099 Posts
Microsoft
Re: UpdatePanel inside UpdatePanel
Feb 15, 2013 02:03 AM|LINK
Hi,
Well Done.
I am glad that you have solved your problem by yourself.
If you have any other problem, welcome to post it in asp.net forums.
Best Regards.
Feedback to us
Develop and promote your apps in Windows Store