PC Review


Reply
Thread Tools Rate Thread

AJAX's TabContainer gives an error

 
 
AAaron123
Guest
Posts: n/a
 
      16th Oct 2009
I add the following code, just as a test, to a master content aspx file that
contains a

SlideShowExtender and a DataList element.

I get the following error :



The Controls collection cannot be modified because the control contains code
blocks (i.e. <% ... %>).



It's such a sweeping restriction that I wonder if I'm doing something wrong
or if there is a way around it.

Is it true that with the TabContainer one can not use any data binding?



Does it apply to things like <%@ Page and <%@ Register




What control's collection is being modified?





<div style="border:solid 3px red">


<cc1:TabContainer ID="TabContainer2" runat="server" ActiveTabIndex="0"
ScrollBars="Auto" Width="211px">

<cc1:TabPanel ID="TabPanelaa" runat="server" HeaderText="TabPanel1">

<ContentTemplate>

This is Home page

<br />


</ContentTemplate>

<HeaderTemplate>

Home

</HeaderTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabPanelbb" runat="server" HeaderText="TabPanel2">

<ContentTemplate>

This is About us page <br />


</ContentTemplate>

<HeaderTemplate>

AboutUs

</HeaderTemplate>

</cc1:TabPanel>

<cc1:TabPanel ID="TabPanelcc" runat="server" HeaderText="TabPanel3">

<ContentTemplate>

This is contact page

<br />


</ContentTemplate>

<HeaderTemplate>

Contact Us

</HeaderTemplate>

</cc1:TabPanel>

</cc1:TabContainer>



</div>





 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      16th Oct 2009
On Oct 16, 1:28*am, "AAaron123" <aaaron...@roadrunner.com> wrote:
> I add the following code, just as a test, to a master content aspx file that
> contains a
>
> SlideShowExtender and a DataList element.
>
> I get the following error :
>
> The Controls collection cannot be modified because the control contains code
> blocks (i.e. <% ... %>).
>
> It's such a sweeping restriction that I wonder if I'm doing something wrong
> or if there is a way around it.
>
> Is it true that *with the TabContainer one can not use any data binding?
>
> Does it apply to things like <%@ Page and *<%@ Register
>
> What control's collection is being modified?
>
> <div style="border:solid 3px red">
>
> <cc1:TabContainer ID="TabContainer2" runat="server" ActiveTabIndex="0"
> ScrollBars="Auto" Width="211px">
>
> <cc1:TabPanel ID="TabPanelaa" runat="server" HeaderText="TabPanel1">
>
> <ContentTemplate>
>
> This is Home page
>
> <br />
>
> </ContentTemplate>
>
> <HeaderTemplate>
>
> Home
>
> </HeaderTemplate>
>
> </cc1:TabPanel>
>
> <cc1:TabPanel ID="TabPanelbb" runat="server" HeaderText="TabPanel2">
>
> <ContentTemplate>
>
> This is About us page <br />
>
> </ContentTemplate>
>
> <HeaderTemplate>
>
> AboutUs
>
> </HeaderTemplate>
>
> </cc1:TabPanel>
>
> <cc1:TabPanel ID="TabPanelcc" runat="server" HeaderText="TabPanel3">
>
> <ContentTemplate>
>
> This is contact page
>
> <br />
>
> </ContentTemplate>
>
> <HeaderTemplate>
>
> Contact Us
>
> </HeaderTemplate>
>
> </cc1:TabPanel>
>
> </cc1:TabContainer>
>
> </div>


I don't see where you have a <% %> block, but perhaps it is because of
the following reason:

http://www.romsteady.net/blog/2007/0...n-cannot..html

Try to put it to the Placeholder Control, hope this helps
 
Reply With Quote
 
AAaron123
Guest
Posts: n/a
 
      18th Oct 2009
Alexey Smirnov wrote:
> On Oct 16, 1:28 am, "AAaron123" <aaaron...@roadrunner.com> wrote:
>> I add the following code, just as a test, to a master content aspx
>> file that contains a
>>
>> SlideShowExtender and a DataList element.
>>
>> I get the following error :
>>
>> The Controls collection cannot be modified because the control
>> contains code blocks (i.e. <% ... %>).
>>
>> It's such a sweeping restriction that I wonder if I'm doing
>> something wrong or if there is a way around it.
>>
>> Is it true that with the TabContainer one can not use any data
>> binding?
>>
>> Does it apply to things like <%@ Page and <%@ Register
>>
>> What control's collection is being modified?
>>
>> <div style="border:solid 3px red">
>>
>> <cc1:TabContainer ID="TabContainer2" runat="server"
>> ActiveTabIndex="0" ScrollBars="Auto" Width="211px">
>>
>> <cc1:TabPanel ID="TabPanelaa" runat="server" HeaderText="TabPanel1">
>>
>> <ContentTemplate>
>>
>> This is Home page
>>
>> <br />
>>
>> </ContentTemplate>
>>
>> <HeaderTemplate>
>>
>> Home
>>
>> </HeaderTemplate>
>>
>> </cc1:TabPanel>
>>
>> <cc1:TabPanel ID="TabPanelbb" runat="server" HeaderText="TabPanel2">
>>
>> <ContentTemplate>
>>
>> This is About us page <br />
>>
>> </ContentTemplate>
>>
>> <HeaderTemplate>
>>
>> AboutUs
>>
>> </HeaderTemplate>
>>
>> </cc1:TabPanel>
>>
>> <cc1:TabPanel ID="TabPanelcc" runat="server" HeaderText="TabPanel3">
>>
>> <ContentTemplate>
>>
>> This is contact page
>>
>> <br />
>>
>> </ContentTemplate>
>>
>> <HeaderTemplate>
>>
>> Contact Us
>>
>> </HeaderTemplate>
>>
>> </cc1:TabPanel>
>>
>> </cc1:TabContainer>
>>
>> </div>

>
> I don't see where you have a <% %> block, but perhaps it is because of
> the following reason:
>
> http://www.romsteady.net/blog/2007/0...on-cannot.html
>
> Try to put it to the Placeholder Control, hope this helps


Unbieverable how much is in this framework.
I'll try that.

Thanks

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ajax TabContainer & ModalPopupExtender mistryman06@gmail.com Microsoft ASP .NET 1 24th Apr 2008 06:38 AM
navigation question using TabContainer-ajax control Paul Microsoft ASP .NET 0 4th Apr 2008 12:59 AM
Little problem with TabContainer (ajax) laziers@gmail.com Microsoft ASP .NET 1 19th Jan 2008 06:40 AM
AJAX TabContainer Problem =?Utf-8?B?QW5kcmV3?= Microsoft ASP .NET 0 27th Sep 2007 10:04 AM
AJAX TabContainer TabPanel Repeater smnbss Microsoft ASP .NET 0 2nd Apr 2007 12:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:04 AM.