473,695 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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-******@microsof t.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****@microsof t.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**********@c ommunity.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bether e.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02. phx.gbl!TK2MSFT NGP01.phx.gbl!T K2MSFTNGP06.phx .gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7899 4
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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 5264
Allen,

I have now managed to resolve this. I noticed in another post a similar
problem which uses the
HttpContext.Cur rent.Request.Fo rm["__EVENTTAR GET"] 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.m icrosoft.comwro te in message
news:On******** ******@TK2MSFTN GHUB02.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-******@microsof t.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****@microsof t.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**********@c ommunity.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bether e.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02. phx.gbl!TK2MSFT NGP01.phx.gbl!T K2MSFTNGP06.phx .gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7899 4
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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="Button 1_Click1" />

Aspx.cs:

protected void Page_PreInit(ob ject sender, EventArgs e)
{
if (IsPostBack)
{
if (Request.Form["__EVENTTAR GET"] != null &&
Request.Form["__EVENTTAR GET"]!=String.Empty)
{
this.Label1.Tex t = Request.Form["__EVENTTAR GET"];
}
else {
this.Label1.Tex t = "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"
UseSubmitBehavi or="false"
onclick="Button 1_Click1" />

The Label will show the button id.

The difference is due to adding the UseSubmitBehavi or="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="__EVENTTA RGET" id="__EVENTTARG ET" value="" />

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(ev entTarget, eventArgument) {
if (!theForm.onsub mit || (theForm.onsubm it() != false)) {
theForm.__EVENT TARGET.value = eventTarget;
theForm.__EVENT ARGUMENT.value = eventArgument;
theForm.submit( );
}
}
//]]>
</script>
<span id="Label1">But ton1</span>
<input type="button" name="Button1" value="Button"
onclick="javasc ript:__doPostBa ck('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 <inputrendere d 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 IPostBackEventH andler. If it does the page will call
this.RegisterRe quiresRaiseEven t(control.PostB ackEventHandler ) 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****@microsof t.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**********@c ommunity.nospam >
| References: <O1************ **@TK2MSFTNGP06 .phx.gbl>
<On************ **@TK2MSFTNGHUB 02.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bether e.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02. phx.gbl!TK2MSFT NGP01.phx.gbl!T K2MSFTNGP02.phx .gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7917 0
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Allen,
|
| I have now managed to resolve this. I noticed in another post a similar
| problem which uses the
| HttpContext.Cur rent.Request.Fo rm["__EVENTTAR GET"] 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.m icrosoft.comwro te in message
| news:On******** ******@TK2MSFTN GHUB02.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-******@microsof t.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****@microsof t.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**********@c ommunity.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.publi c.dotnet.framew ork.aspnet
| | NNTP-Posting-Host: 93-96-97-68.zone4.bether e.co.uk 93.96.97.68
| | Path: TK2MSFTNGHUB02. phx.gbl!TK2MSFT NGP01.phx.gbl!T K2MSFTNGP06.phx .gbl
| | Xref: TK2MSFTNGHUB02. phx.gbl
| microsoft.publi c.dotnet.framew ork.aspnet:7899 4
| | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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.m icrosoft.comwro te in message
news:ZM******** ******@TK2MSFTN GHUB02.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="Button 1_Click1" />

Aspx.cs:

protected void Page_PreInit(ob ject sender, EventArgs e)
{
if (IsPostBack)
{
if (Request.Form["__EVENTTAR GET"] != null &&
Request.Form["__EVENTTAR GET"]!=String.Empty)
{
this.Label1.Tex t = Request.Form["__EVENTTAR GET"];
}
else {
this.Label1.Tex t = "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"
UseSubmitBehavi or="false"
onclick="Button 1_Click1" />

The Label will show the button id.

The difference is due to adding the UseSubmitBehavi or="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="__EVENTTA RGET" id="__EVENTTARG ET" value="" />

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['form1'];
if (!theForm) {
theForm = document.form1;
}
function __doPostBack(ev entTarget, eventArgument) {
if (!theForm.onsub mit || (theForm.onsubm it() != false)) {
theForm.__EVENT TARGET.value = eventTarget;
theForm.__EVENT ARGUMENT.value = eventArgument;
theForm.submit( );
}
}
//]]>
</script>
<span id="Label1">But ton1</span>
<input type="button" name="Button1" value="Button"
onclick="javasc ript:__doPostBa ck('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 <inputrendere d 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 IPostBackEventH andler. If it does the page will call
this.RegisterRe quiresRaiseEven t(control.PostB ackEventHandler ) 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****@microsof t.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**********@c ommunity.nospam >
| References: <O1************ **@TK2MSFTNGP06 .phx.gbl>
<On************ **@TK2MSFTNGHUB 02.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: 93-96-97-68.zone4.bether e.co.uk 93.96.97.68
| Path: TK2MSFTNGHUB02. phx.gbl!TK2MSFT NGP01.phx.gbl!T K2MSFTNGP02.phx .gbl
| Xref: TK2MSFTNGHUB02. phx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:7917 0
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Allen,
|
| I have now managed to resolve this. I noticed in another post a similar
| problem which uses the
| HttpContext.Cur rent.Request.Fo rm["__EVENTTAR GET"] 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.m icrosoft.comwro te in message
| news:On******** ******@TK2MSFTN GHUB02.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-******@microsof t.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****@microsof t.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**********@c ommunity.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.publi c.dotnet.framew ork.aspnet
| | NNTP-Posting-Host: 93-96-97-68.zone4.bether e.co.uk 93.96.97.68
| | Path:
TK2MSFTNGHUB02. phx.gbl!TK2MSFT NGP01.phx.gbl!T K2MSFTNGP06.phx .gbl
| | Xref: TK2MSFTNGHUB02. phx.gbl
| microsoft.publi c.dotnet.framew ork.aspnet:7899 4
| | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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
6273
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 as normal. The button works fine outside of the pane, but once I put it in the pane it no longer fires the event. How can I get a button in the accordion to run a function on the server on the onclick event? Thanks.
7
6193
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 aCC = new Accordion(); AccordionPane aPane = new AccordionPane();
0
6883
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 is a link button in the header. I have read several posts that suggest I need to add the ControlID in the codebehind, so I have and I don't get any errors, but also there's nothing loading into the updatepanel. Here's the code; Codebehind:
0
1866
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 use of dynamic controls and am having some issues with getting the accordion to work properly. What happens when one of my user controls fires a postback is that the accordion gets set back to the first pane. I suspect that this is happening...
3
1539
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. These are .PNG files and in runtime all the edges are doubled it looks like the there are two images one ontop of the other and slightly smaller so that you see the edges of the image on the bottom?
1
3562
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 works well as expected. Are there any tricks for Accordion Control ? the .aspx code ; **************** <cc1:Accordion ID="Accordion1" runat="server" FadeTransitions="True"
8
2728
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. In certain cases (only) it renders but is dead - does not initialize. Before the migration it worked, no changes have been made. Here is the complete scenario description:
7
6655
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 tabcontainer which has 1 panel already, however I want to try create the TabPanels dynamically. I followed the advice here: http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe Stagner)
8
3601
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> <dd>content of the 1st pane</dd> <dt>click here for the 1st pane</dt> <dd>content of the 1st pane</dd> <dt>click here for the 1st pane</dt>
0
8553
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8971
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8822
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8815
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6483
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5827
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4332
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2994
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2251
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.