Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > button click event in a AccordionPane control

Reply
Thread Tools

button click event in a AccordionPane control

 
 
Sinan Alkan
Guest
Posts: n/a
 
      09-24-2008
Hi All,

I have a button object in an AccordionPane on a "Web User Control" but i can
not reach the click event of that button.
The click event does not work.
Here is my .ascx code ;
------------
<cc1:Accordion ID="AccordionPane1" runat="server" FadeTransitions="True"
SelectedIndex="0" TransitionDuration="300" HeaderCssClass="accordionHeader"
ContentCssClass="accordionContent" RequireOpenedPane="false">
<Panes>
<cc1:AccordionPane runat="server" ID="Price_Range">
<Header>For Price Filtering</Header>
<Content>
$<asp:TextBox ID="txtStart" runat="server"></asp:TextBox> to
$<asp:TextBox ID="txtEnd" runat="server"></asp:TextBox>
<asp:Button ID="btnSendPriceRange" runat="server" Text="GO"
OnClick="btnSendPriceRange_Click" />
</Content>
</cc1:AccordionPane>
</Panes>
</cc1:Accordion>

------------
And the code for the .cs file
------------
void btnSendPriceRange_Click(object sender, EventArgs e)
{
//do something
}
------------
i can not reach the btnSendPriceRange_Click event ..

when i click that button, it just refreshes the all page.

Any assistance that anyone could provide would be most appreciated.


Thanks in advance.


Sinan ALKAN





 
Reply With Quote
 
 
 
 
Mark Fitzpatrick
Guest
Posts: n/a
 
      09-24-2008
Try to wire it up in the page's oninit event instead. I've often found that
there are cases when buttons are in certain containers that the onclick
events don't get wired up properly because they are in a container. You may
also want to check the forums for the asp.net ajax toolkit over at
www.asp.net because I think this is a known issue if I remember correctly. I
believe I solved my problems by wiring it up in code-behind in the init
event.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression

"Sinan Alkan" <(E-Mail Removed)> wrote in message
news:eDu#(E-Mail Removed)...
> Hi All,
>
> I have a button object in an AccordionPane on a "Web User Control" but i
> can not reach the click event of that button.
> The click event does not work.
> Here is my .ascx code ;
> ------------
> <cc1:Accordion ID="AccordionPane1" runat="server" FadeTransitions="True"
> SelectedIndex="0" TransitionDuration="300"
> HeaderCssClass="accordionHeader"
> ContentCssClass="accordionContent" RequireOpenedPane="false">
> <Panes>
> <cc1:AccordionPane runat="server" ID="Price_Range">
> <Header>For Price Filtering</Header>
> <Content>
> $<asp:TextBox ID="txtStart" runat="server"></asp:TextBox> to
> $<asp:TextBox ID="txtEnd" runat="server"></asp:TextBox>
> <asp:Button ID="btnSendPriceRange" runat="server" Text="GO"
> OnClick="btnSendPriceRange_Click" />
> </Content>
> </cc1:AccordionPane>
> </Panes>
> </cc1:Accordion>
>
> ------------
> And the code for the .cs file
> ------------
> void btnSendPriceRange_Click(object sender, EventArgs e)
> {
> //do something
> }
> ------------
> i can not reach the btnSendPriceRange_Click event ..
>
> when i click that button, it just refreshes the all page.
>
> Any assistance that anyone could provide would be most appreciated.
>
>
> Thanks in advance.
>
>
> Sinan ALKAN
>
>
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Web Controls 0 05-25-2004 01:45 AM



Advertisments