Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Ajax Tab control within formview

Posted on 2008-10-07
6
Medium Priority
?
882 Views
Last Modified: 2012-05-05
I had many fields within a formview.  I was able to use the same name for the textboxs, labels, etc in my edit template, insert template, item template.  

Now I would like to use a tab control within the formview.  I need a tab control in each template (edit, item, insert).  However, it won't let me create controls with the same name.  For instance, in the edit, item and insert form templates I want a field called "txtEmployee" in a tab panel in a tab control.  It says a definition already exists for txtEmployee.   Is there a way to do this?
0
Comment
Question by:weimha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 22663708
You would have to get each Tab control a unique ID.
0
 

Author Comment

by:weimha
ID: 22668358
I have attached my code below.  I gave the tab control a unique ID but it still doesn't work.

     <%-- In edittemplate--%>
            <cc1:TabContainer ID="TabContainer3" runat="server">
                <cc1:TabPanel runat="server" ID="TabPanel1" HeaderText="Employee">
                    <ContentTemplate>
                        <div class="ExpenseGroup">
                            <asp:Panel ID="Panel1" runat="server">
                                <div class="body">
                                    <div class="content">
                                        <div class="row">
                                            <span class="labelcolumn">Employee:</span> <span class="column">
                                                <asp:TextBox ID="txtEmployee" runat="server" Text='<%# Bind("Employee") %>' SkinID="txtNumberField" /></span>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </ContentTemplate>
                </cc1:TabPanel>
            </cc1:TabContainer>
            
           <%-- in insert template--%>
              <cc1:TabContainer ID="TabContainer4" runat="server">
                <cc1:TabPanel runat="server" ID="TabPanel2" HeaderText="Employee">
                    <ContentTemplate>
                        <div class="ExpenseGroup">
                            <asp:Panel ID="Panel2" runat="server">
                                <div class="body">
                                    <div class="content">
                                        <div class="row">
                                            <span class="labelcolumn">Employee:</span> <span class="column">
                                                <asp:TextBox ID="txtEmployee" runat="server" Text='<%# Bind("Employee") %>' SkinID="txtNumberField" /></span>
                                        </div>
                                    </div>
                                </div>
                            </asp:Panel>
                        </div>
                    </ContentTemplate>
                </cc1:TabPanel>
            </cc1:TabContainer> 
            

Open in new window

0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 22675019
"but is still doesn't work" doesn't explain why it didn't work.  Please try to be as specific as you can about your current situation.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:weimha
ID: 22686185
Sorry.  "still doesn't work" meaning I get the same error I was getting before (described in the qustion).
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 1500 total points
ID: 22686464
You said you have the Tab control unique IDs, but the exception is that the TextBox controls have the same ID.  No control can have the same ID.
0
 

Author Comment

by:weimha
ID: 22787732
Okay,  thanks.  I have decided not to use the formview.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question