473,387 Members | 1,882 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,387 software developers and data experts.

button click event in a AccordionPane control

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

Sep 24 '08 #1
1 4876
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" <DL@DL.comwrote in message
news:eD*************@TK2MSFTNGP03.phx.gbl...
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


Sep 24 '08 #2

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

Similar topics

6
by: Michael Johnson Jr. | last post by:
I am trying to handle a button click event, which updates a web control table with data. The button is dynamically created in the table itself. When I call updateTable() in the Page_Load the new...
4
by: Winista | last post by:
I have a page with bunch of user controls and standard controls on the page. And then I have a Button control on the page which is used to save the data on server side. All was working fine and...
3
by: Robert W. | last post by:
I'm new to ASP.net programming so excuse my ignorance if the following question seems overly simplistic. I've created a simple Login form with 3 primary WebControls: - A TextBox for the Username...
8
by: Learner | last post by:
Hello, I converted a VS 2003 project to VS 2005. It works perfectly alright in VS 2003 but when I try running in VS 2005 I got strange thing going on. The code (my button click event ) runs...
0
by: nraji | last post by:
hi, I have designed a web part using VS 2003 (Web control library template). I need to publish that in share point. Its not like drag and drop the things from toolbar. Every thing I need to do in...
7
by: =?Utf-8?B?bWFydGluMQ==?= | last post by:
Hi, All, I create button in the code ( Dim Button as new Button), not using button web component (means not drap button and drop it ont he webform), after that I try to use button_click event,...
2
by: GauravGupta | last post by:
i am displaying a table in page load whose data is fetched from database . it also check what data is to be displayed from data base by a session variable. and i have few button which change the...
0
by: ADN | last post by:
Hi, I am currently extending the GridView control and would like to add a button to the GridView so that it will automatically render one button at the top of the grid. I have a click event for...
1
by: petersonus115 | last post by:
Hi my name is jewel.. i am having a problem with accordion pane.. I am using newest version of ajax control tool kit.. i have two text box and one button in my accordion pane... I want to execute...
19
Frinavale
by: Frinavale | last post by:
I'm in the middle of implementing a custom Ajax enabled Server Control. At this point I need help finding the answer to an Ajax Framework question...here it goes: I have a Server Control that...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.