473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

RE: Dynamically Add and Remove Accordion Control Panes

Hi Richard,

Quote from Richard=========================================== =======

However I also want to be able to remove the
panes. I have tried to include this, but find that when I first add the
pane
the remove event does not get handled, though thereafter it is handled
without problems.
==================================================

Sorry Richard but I'm not quite clear about what you mentioned above. Do
you mean when you add the pane the remove event will not fire? If so I
think it's normal. Why the remove event need to fire when we add the pane?
From the code you provided I think the Remove_Pane will be called if user
clicks the removeLB LinkButton.

I could not find the definition of LocationInfoDTO and the other controls
defined in the aspx so I cannot reproduce it on my side. Could you send me
a demo project and clarify the problem? My email is v-******@microsoft.com.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "RichB" <ri**********@community.nospam>
| Subject: Dynamically Add and Remove Accordion Control Panes
| Date: Fri, 31 Oct 2008 15:54:01 -0000
| Lines: 178
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| X-RFC2646: Format=Flowed; Original
| Message-ID: <O1**************@TK2MSFTNGP06.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bethere.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP06.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:78994
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| I have a Page which contains an Accordion Control with dynamically added
| custom panes. I have added a link button to the page to allow further
panes
| to be added and this works. However I also want to be able to remove the
| panes. I have tried to include this, but find that when I first add the
pane
| the remove event does not get handled, though thereafter it is handled
| without problems. I would be grateful if someone could take a look and
| advise why I am getting this problem (I have attached all relevant code).
|
| Thanks, Richard
|
|
|
|

Nov 3 '08 #1
3 5221
Allen,

I have now managed to resolve this. I noticed in another post a similar
problem which uses the
HttpContext.Current.Request.Form["__EVENTTARGET"] string to get the button
clicked and process it within the Page_PreInit rather than in the event.
This works fine, unless you believe that this approach is inappropriate,
then please ignore my email with example code.

This seems to be an easy approach, far easier than using the click event.
How should I decide whether to use the click event versus this method?

Thanks,
Richard


"Allen Chen [MSFT]" <v-******@online.microsoft.comwrote in message
news:On**************@TK2MSFTNGHUB02.phx.gbl...
Hi Richard,

Quote from Richard=========================================== =======

However I also want to be able to remove the
panes. I have tried to include this, but find that when I first add the
pane
the remove event does not get handled, though thereafter it is handled
without problems.
==================================================

Sorry Richard but I'm not quite clear about what you mentioned above. Do
you mean when you add the pane the remove event will not fire? If so I
think it's normal. Why the remove event need to fire when we add the pane?
From the code you provided I think the Remove_Pane will be called if user
clicks the removeLB LinkButton.

I could not find the definition of LocationInfoDTO and the other controls
defined in the aspx so I cannot reproduce it on my side. Could you send me
a demo project and clarify the problem? My email is
v-******@microsoft.com.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support
Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
| From: "RichB" <ri**********@community.nospam>
| Subject: Dynamically Add and Remove Accordion Control Panes
| Date: Fri, 31 Oct 2008 15:54:01 -0000
| Lines: 178
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| X-RFC2646: Format=Flowed; Original
| Message-ID: <O1**************@TK2MSFTNGP06.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bethere.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP06.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:78994
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
|
| I have a Page which contains an Accordion Control with dynamically added
| custom panes. I have added a link button to the page to allow further
panes
| to be added and this works. However I also want to be able to remove the
| panes. I have tried to include this, but find that when I first add the
pane
| the remove event does not get handled, though thereafter it is handled
| without problems. I would be grateful if someone could take a look and
| advise why I am getting this problem (I have attached all relevant
code).
|
| Thanks, Richard
|
|
|
|

Nov 4 '08 #2
Hello Richard,

I think either way is ok. Actually ASP.NET internally checks the event
target via the Request.Form as well. I just want to mention when can use
__EVENTTARGET to get the clicked button id. To test, please create a new
web application and try following code:

Test1:

Aspx:
<asp:Label ID="Label1" runat="server"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button"
onclick="Button1_Click1" />

Aspx.cs:

protected void Page_PreInit(object sender, EventArgs e)
{
if (IsPostBack)
{
if (Request.Form["__EVENTTARGET"] != null &&
Request.Form["__EVENTTARGET"]!=String.Empty)
{
this.Label1.Text = Request.Form["__EVENTTARGET"];
}
else {
this.Label1.Text = "No value";
}
}
}

protected void Button1_Click1(object sender, EventArgs e)
{

}

You can see the Label will show "No value" when you click the button.

Test2:

If we try this:

<asp:Button ID="Button1" runat="server" Text="Button"
UseSubmitBehavior="false"
onclick="Button1_Click1" />

The Label will show the button id.

The difference is due to adding the UseSubmitBehavior="false", which
changes the HTML rendered by the ASP.NET button control. We can view source
to see what's the rendered HTML.

The HTML rendered by Test1:

<span id="Label1"></span>
<input type="submit" name="Button1" value="Button" id="Button1" />
The HTML rendered by Test2:

<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<span id="Label1">Button1</span>
<input type="button" name="Button1" value="Button"
onclick="javascript:__doPostBack('Button1','')" id="Button1" />

We can see in Test2 the ASP.NET button control will call javascript
function when we click the button. In that function it assigns the id to
the __EVENTTARGET hidden field thus we can get the id at server side via
Request.Form. (As we know the hidden input will be submitted to the server
along with the form).

Then the question is how the ASP.NET can know which button is clicked if
the id cannot be retrieved from the __EVENTTARGET, namely in the Test1 how
the button click event can fire? We need to notice another difference in
the html, that is the type of the <inputrendered by the ASP.NET button
control. In the Test1 it's of type submit while in Test2 it's of type
button. The browser will treat the submit input differently. The id of the
submit input will be sent to the request along with the form just as the
hidden input. On the ProcessPostData stage of the page life cycle the
ASP.NET page will check all the posted data and use FindControl method to
find the control. When a reference is got it will check if the control
implements IPostBackEventHandler. If it does the page will call
this.RegisterRequiresRaiseEvent(control.PostBackEv entHandler) to register
the event handler for later call. Since the button implements this
interface it can benefit from this feature as long as its id is posted to
server on postback.

If you need further questions please feel free to ask.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
| From: "RichB" <ri**********@community.nospam>
| References: <O1**************@TK2MSFTNGP06.phx.gbl>
<On**************@TK2MSFTNGHUB02.phx.gbl>
| Subject: Re: Dynamically Add and Remove Accordion Control Panes
| Date: Tue, 4 Nov 2008 11:39:11 -0000
| Lines: 109
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| X-RFC2646: Format=Flowed; Original
| Message-ID: <ef**************@TK2MSFTNGP02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bethere.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:79170
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Allen,
|
| I have now managed to resolve this. I noticed in another post a similar
| problem which uses the
| HttpContext.Current.Request.Form["__EVENTTARGET"] string to get the
button
| clicked and process it within the Page_PreInit rather than in the event.
| This works fine, unless you believe that this approach is inappropriate,
| then please ignore my email with example code.
|
| This seems to be an easy approach, far easier than using the click event.
| How should I decide whether to use the click event versus this method?
|
| Thanks,
| Richard
|
|
|
|
| "Allen Chen [MSFT]" <v-******@online.microsoft.comwrote in message
| news:On**************@TK2MSFTNGHUB02.phx.gbl...
| Hi Richard,
| >
| Quote from Richard=========================================== =======
| >
| However I also want to be able to remove the
| panes. I have tried to include this, but find that when I first add the
| pane
| the remove event does not get handled, though thereafter it is handled
| without problems.
| ==================================================
| >
| Sorry Richard but I'm not quite clear about what you mentioned above. Do
| you mean when you add the pane the remove event will not fire? If so I
| think it's normal. Why the remove event need to fire when we add the
pane?
| From the code you provided I think the Remove_Pane will be called if
user
| clicks the removeLB LinkButton.
| >
| I could not find the definition of LocationInfoDTO and the other
controls
| defined in the aspx so I cannot reproduce it on my side. Could you send
me
| a demo project and clarify the problem? My email is
| v-******@microsoft.com.
| >
| Regards,
| Allen Chen
| Microsoft Online Support
| >
| Delighting our customers is our #1 priority. We welcome your comments
and
| suggestions about how we can improve the support we provide to you.
Please
| feel free to let my manager know what you think of the level of service
| provided. You can send feedback directly to my manager at:
| ms****@microsoft.com.
| >
| ==================================================
| Get notification to my posts through email? Please refer to
| >
http://msdn.microsoft.com/en-us/subs...#notifications.
| >
| Note: MSDN Managed Newsgroup support offering is for non-urgent issues
| where an initial response from the community or a Microsoft Support
| Engineer within 2 business day is acceptable. Please note that each
follow
| up response may take approximately 2 business days as the support
| professional working with you may need further investigation to reach
the
| most efficient resolution. The offering is not appropriate for
situations
| that require urgent, real-time or phone-based interactions. Issues of
this
| nature are best handled working with a dedicated Microsoft Support
| Engineer
| by contacting Microsoft Customer Support Services (CSS) at
| http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
| ==================================================
| This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| --------------------
| | From: "RichB" <ri**********@community.nospam>
| | Subject: Dynamically Add and Remove Accordion Control Panes
| | Date: Fri, 31 Oct 2008 15:54:01 -0000
| | Lines: 178
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| | X-RFC2646: Format=Flowed; Original
| | Message-ID: <O1**************@TK2MSFTNGP06.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: 93-96-97-68.zone4.bethere.co.uk 93.96.97.68
| | Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP06.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:78994
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| |
| | I have a Page which contains an Accordion Control with dynamically
added
| | custom panes. I have added a link button to the page to allow further
| panes
| | to be added and this works. However I also want to be able to remove
the
| | panes. I have tried to include this, but find that when I first add
the
| pane
| | the remove event does not get handled, though thereafter it is handled
| | without problems. I would be grateful if someone could take a look and
| | advise why I am getting this problem (I have attached all relevant
| code).
| |
| | Thanks, Richard
| |
| |
| |
| |
| >
|
|
|

Nov 5 '08 #3
Thanks, it all makes a lot more sense looking at some of behind the scenes,
but I'll bare in mind the issues below.

Thanks, for your help.
Richard

"Allen Chen [MSFT]" <v-******@online.microsoft.comwrote in message
news:ZM**************@TK2MSFTNGHUB02.phx.gbl...
Hello Richard,

I think either way is ok. Actually ASP.NET internally checks the event
target via the Request.Form as well. I just want to mention when can use
__EVENTTARGET to get the clicked button id. To test, please create a new
web application and try following code:

Test1:

Aspx:
<asp:Label ID="Label1" runat="server"></asp:Label>
<asp:Button ID="Button1" runat="server" Text="Button"
onclick="Button1_Click1" />

Aspx.cs:

protected void Page_PreInit(object sender, EventArgs e)
{
if (IsPostBack)
{
if (Request.Form["__EVENTTARGET"] != null &&
Request.Form["__EVENTTARGET"]!=String.Empty)
{
this.Label1.Text = Request.Form["__EVENTTARGET"];
}
else {
this.Label1.Text = "No value";
}
}
}

protected void Button1_Click1(object sender, EventArgs e)
{

}

You can see the Label will show "No value" when you click the button.

Test2:

If we try this:

<asp:Button ID="Button1" runat="server" Text="Button"
UseSubmitBehavior="false"
onclick="Button1_Click1" />

The Label will show the button id.

The difference is due to adding the UseSubmitBehavior="false", which
changes the HTML rendered by the ASP.NET button control. We can view
source
to see what's the rendered HTML.

The HTML rendered by Test1:

<span id="Label1"></span>
<input type="submit" name="Button1" value="Button" id="Button1" />
The HTML rendered by Test2:

<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<span id="Label1">Button1</span>
<input type="button" name="Button1" value="Button"
onclick="javascript:__doPostBack('Button1','')" id="Button1" />

We can see in Test2 the ASP.NET button control will call javascript
function when we click the button. In that function it assigns the id to
the __EVENTTARGET hidden field thus we can get the id at server side via
Request.Form. (As we know the hidden input will be submitted to the server
along with the form).

Then the question is how the ASP.NET can know which button is clicked if
the id cannot be retrieved from the __EVENTTARGET, namely in the Test1 how
the button click event can fire? We need to notice another difference in
the html, that is the type of the <inputrendered by the ASP.NET button
control. In the Test1 it's of type submit while in Test2 it's of type
button. The browser will treat the submit input differently. The id of the
submit input will be sent to the request along with the form just as the
hidden input. On the ProcessPostData stage of the page life cycle the
ASP.NET page will check all the posted data and use FindControl method to
find the control. When a reference is got it will check if the control
implements IPostBackEventHandler. If it does the page will call
this.RegisterRequiresRaiseEvent(control.PostBackEv entHandler) to register
the event handler for later call. Since the button implements this
interface it can benefit from this feature as long as its id is posted to
server on postback.

If you need further questions please feel free to ask.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support
Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
| From: "RichB" <ri**********@community.nospam>
| References: <O1**************@TK2MSFTNGP06.phx.gbl>
<On**************@TK2MSFTNGHUB02.phx.gbl>
| Subject: Re: Dynamically Add and Remove Accordion Control Panes
| Date: Tue, 4 Nov 2008 11:39:11 -0000
| Lines: 109
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| X-RFC2646: Format=Flowed; Original
| Message-ID: <ef**************@TK2MSFTNGP02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bethere.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP02.phx.gbl
| Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:79170
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Allen,
|
| I have now managed to resolve this. I noticed in another post a similar
| problem which uses the
| HttpContext.Current.Request.Form["__EVENTTARGET"] string to get the
button
| clicked and process it within the Page_PreInit rather than in the event.
| This works fine, unless you believe that this approach is inappropriate,
| then please ignore my email with example code.
|
| This seems to be an easy approach, far easier than using the click
event.
| How should I decide whether to use the click event versus this method?
|
| Thanks,
| Richard
|
|
|
|
| "Allen Chen [MSFT]" <v-******@online.microsoft.comwrote in message
| news:On**************@TK2MSFTNGHUB02.phx.gbl...
| Hi Richard,
| >
| Quote from Richard=========================================== =======
| >
| However I also want to be able to remove the
| panes. I have tried to include this, but find that when I first add
the
| pane
| the remove event does not get handled, though thereafter it is handled
| without problems.
| ==================================================
| >
| Sorry Richard but I'm not quite clear about what you mentioned above.
Do
| you mean when you add the pane the remove event will not fire? If so I
| think it's normal. Why the remove event need to fire when we add the
pane?
| From the code you provided I think the Remove_Pane will be called if
user
| clicks the removeLB LinkButton.
| >
| I could not find the definition of LocationInfoDTO and the other
controls
| defined in the aspx so I cannot reproduce it on my side. Could you
send
me
| a demo project and clarify the problem? My email is
| v-******@microsoft.com.
| >
| Regards,
| Allen Chen
| Microsoft Online Support
| >
| Delighting our customers is our #1 priority. We welcome your comments
and
| suggestions about how we can improve the support we provide to you.
Please
| feel free to let my manager know what you think of the level of
service
| provided. You can send feedback directly to my manager at:
| ms****@microsoft.com.
| >
| ==================================================
| Get notification to my posts through email? Please refer to
| >
http://msdn.microsoft.com/en-us/subs...#notifications.
| >
| Note: MSDN Managed Newsgroup support offering is for non-urgent issues
| where an initial response from the community or a Microsoft Support
| Engineer within 2 business day is acceptable. Please note that each
follow
| up response may take approximately 2 business days as the support
| professional working with you may need further investigation to reach
the
| most efficient resolution. The offering is not appropriate for
situations
| that require urgent, real-time or phone-based interactions. Issues of
this
| nature are best handled working with a dedicated Microsoft Support
| Engineer
| by contacting Microsoft Customer Support Services (CSS) at
| http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
| ==================================================
| This posting is provided "AS IS" with no warranties, and confers no
| rights.
| >
| --------------------
| | From: "RichB" <ri**********@community.nospam>
| | Subject: Dynamically Add and Remove Accordion Control Panes
| | Date: Fri, 31 Oct 2008 15:54:01 -0000
| | Lines: 178
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
| | X-RFC2646: Format=Flowed; Original
| | Message-ID: <O1**************@TK2MSFTNGP06.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: 93-96-97-68.zone4.bethere.co.uk 93.96.97.68
| | Path:
TK2MSFTNGHUB02.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSF TNGP06.phx.gbl
| | Xref: TK2MSFTNGHUB02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:78994
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| |
| | I have a Page which contains an Accordion Control with dynamically
added
| | custom panes. I have added a link button to the page to allow
further
| panes
| | to be added and this works. However I also want to be able to remove
the
| | panes. I have tried to include this, but find that when I first add
the
| pane
| | the remove event does not get handled, though thereafter it is
handled
| | without problems. I would be grateful if someone could take a look
and
| | advise why I am getting this problem (I have attached all relevant
| code).
| |
| | Thanks, Richard
| |
| |
| |
| |
| >
|
|
|

Nov 6 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: =?Utf-8?B?R2VyaGFyZA==?= | last post by:
I am just stating to use ajax, and have a perfect place to use the accordion control. I have it working fine, but need to have a normal asp button in one of the panes that fires an onclick event...
7
by: srilakshmim | last post by:
Hello I want to create Accordion (Ajax Control Tool Kit). My Code is as follows protected void Page_Load(object sender, EventArgs e) { try { Accordion...
0
by: rsdev | last post by:
Hi, I am new to implementing Asynchronous javascript in asp.net (or any framework) and have come across a problem. In a user control I have an accordion with a nested updatepanel, the trigger...
0
by: rcon | last post by:
I'm creating a user control to prompt for crystal reports parameters. The individual controls work fine, and the over all control works fine too. However, I'm not really that experienced in the...
3
by: Ty | last post by:
I have an accordion control with serveral panes. I am placing icons and hyperlinks in the panes. In design mode the images look great but as soon as I run the project the images look like crap....
1
by: David Lazos | last post by:
Hi, I'm using the HeaderTemplate and the ContentTemplate of the Accordion control and binding it to a DataTable. But it doesn't display any data. If i bind the same datatable to a datalist it...
8
by: Tomasz J | last post by:
Hello developers, After migrating my web project application (using the old model) to .Net Framework 3.5 and Ajax Control Toolkit release 20820 the Accordion control no longer works correctly....
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
8
by: quipo | last post by:
Hi, im using an accordion script but it doesnt work if i use it with ajax. example: <div id="accordion"> <dl class="accordion" id="slider"> <dt>click here for the 1st pane</dt> ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.