473,471 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

REALLY FRUSTRATING, Please help!!

I riepilogate with corrections and updates:

I've an Ajax Accordion that gets data from a database, in its content
there is a Repeater that gets data from another table, depending which
header is selected in the accordion.

in the Repeater I've a checkbox (one for eache repeated field) checked
by default that I select/deselect triggering the method
OnCheckedChanged which updates the record in the table connected to
the repeater.

this method OnCheckedChanged is triggered correctly (with the right
ClientID) when I deselect the a checkbox. I use the passed sender
checkbox's ClientID to identify and modify the record in the table

PROBLEM:
when I deselect the CheckBox, the correct sender ClientID is passed,
when I select the previously deselected checkbox a wrong ClientID is
passed!
in particolar, i found that it is passed the ClientID of last
unselected chechbox in the repeater

Please help, I'm going nuts!

here is the essential structure:
======================aspx
page========================================
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Shipping.aspx.cs"
Inherits="test" MaintainScrollPositionOnPostback="true" %>
<ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true"
runat="Server" ID="ToolkitScriptManager1" />
<ajaxToolkit:Accordion ID="MyAccordion" runat="server"
SelectedIndex="0" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent"
FadeTransitions="false" FramesPerSecond="1"
TransitionDuration="1" AutoSize="None"
RequireOpenedPane="true" SuppressHeaderPostbacks="false"
Width="900px" >
<ContentTemplate>
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:CheckBox ID="ManifestCheckBox"
runat="server" AutoPostBack="true"
Checked="True" OnCheckedChanged =
"ManifestCheckBox_CheckedChanged" />
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</ajaxToolkit:Accordion>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:XXXXXXXXXXXXXXX %>"
SelectCommand="SELECT * FROM [tblPICManifest] WHERE
([PICBatchID] =
@PICBatchID)">
<SelectParameters>
<asp:ControlParameter ControlID="selectedLbl"
DefaultValue=""
Name="PICBatchID"
PropertyName="Text" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
======================aspx.cs
code========================================
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
else
{
............
}
protected void ManifestCheckBox_CheckedChanged(object sender,
EventArgs e)
{
Control ctrSender = (Control)sender;
string controlID = ctrSender.ClientID;
............

}
--
ciao
Vittorix

Dec 19 '07 #1
4 1268
Probably a good idea not to start with "riepilogate". You scared me away
from reading the rest of your post after seeing that!
"Vittorix" <vi******@gmail.comwrote in message
news:8c**********************************@f3g2000h sg.googlegroups.com...
>I riepilogate with corrections and updates:

I've an Ajax Accordion that gets data from a database, in its content
there is a Repeater that gets data from another table, depending which
header is selected in the accordion.

in the Repeater I've a checkbox (one for eache repeated field) checked
by default that I select/deselect triggering the method
OnCheckedChanged which updates the record in the table connected to
the repeater.

this method OnCheckedChanged is triggered correctly (with the right
ClientID) when I deselect the a checkbox. I use the passed sender
checkbox's ClientID to identify and modify the record in the table

PROBLEM:
when I deselect the CheckBox, the correct sender ClientID is passed,
when I select the previously deselected checkbox a wrong ClientID is
passed!
in particolar, i found that it is passed the ClientID of last
unselected chechbox in the repeater

Please help, I'm going nuts!

here is the essential structure:
======================aspx
page========================================
<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="Shipping.aspx.cs"
Inherits="test" MaintainScrollPositionOnPostback="true" %>
<ajaxToolkit:ToolkitScriptManager EnablePartialRendering="true"
runat="Server" ID="ToolkitScriptManager1" />
<ajaxToolkit:Accordion ID="MyAccordion" runat="server"
SelectedIndex="0" HeaderCssClass="accordionHeader"
HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent"
FadeTransitions="false" FramesPerSecond="1"
TransitionDuration="1" AutoSize="None"
RequireOpenedPane="true" SuppressHeaderPostbacks="false"
Width="900px" >
<ContentTemplate>
<asp:Repeater ID="Repeater1" runat="server"
DataSourceID="SqlDataSource1">
<ItemTemplate>
<asp:CheckBox ID="ManifestCheckBox"
runat="server" AutoPostBack="true"
Checked="True" OnCheckedChanged =
"ManifestCheckBox_CheckedChanged" />
</ItemTemplate>
</asp:Repeater>
</ContentTemplate>
</ajaxToolkit:Accordion>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:XXXXXXXXXXXXXXX %>"
SelectCommand="SELECT * FROM [tblPICManifest] WHERE
([PICBatchID] =
@PICBatchID)">
<SelectParameters>
<asp:ControlParameter ControlID="selectedLbl"
DefaultValue=""
Name="PICBatchID"
PropertyName="Text" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
======================aspx.cs
code========================================
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
else
{
............
}
protected void ManifestCheckBox_CheckedChanged(object sender,
EventArgs e)
{
Control ctrSender = (Control)sender;
string controlID = ctrSender.ClientID;
............

}
--
ciao
Vittorix

Dec 20 '07 #2
"Scott M." <sm**@nospam.nospamwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
Probably a good idea not to start with "riepilogate". You scared me away
from reading the rest of your post after seeing that!
The OP is obviously Italian, and by "riepilogate" he means "recapitulate"...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Dec 20 '07 #3
Scott M. wrote:
Probably a good idea not to start with "riepilogate".
sorry :)
Now can I get some help?

--
ciao
Vittorix
Dec 20 '07 #4
Mark Rae [MVP] wrote:
>Probably a good idea not to start with "riepilogate". You scared me
away from reading the rest of your post after seeing that!

The OP is obviously Italian, and by "riepilogate" he means
"recapitulate"...
you got me :-D

--
ciao
Vittorix
Dec 20 '07 #5

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

Similar topics

3
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
1
by: Margaret101 | last post by:
Hi!! I'm trying to do some simple paging with goes to the database once and then shows and hides the results to display 3 items at a time. It uses a next and previous button. The next button works...
22
by: SQACSharp | last post by:
I'm trying to get the control name of an editbox in another window. The following code set the value "MyPassword" in the password EditBox but it fail to return the control name of the EditBox. ...
0
by: tyson verdez | last post by:
imma beginner and my iinstructur doesnt do hands on wit us we learn out of a lecture but it doesnt help some1 please help me 1. (The MyTriangle class) Write a class/program named MyTriangle. ...
3
by: ummaria | last post by:
Hello I have a drop down list that retrieves data from a data base. Under that I have a textbox that I want to retrieve information also from the database depending on the previously selected...
1
lolixpop
by: lolixpop | last post by:
Hi everybody thanks for reading! i have a few actionscript questions that i really need help on...any help would be greatly appreciated! Okay so i came upon this tutorial:...
0
by: Vittorix | last post by:
Hi everybody. I've an Ajax Accordion that gets data from a database, in its content there is a Repeater that gets data from another table, depending which header is selected in the accordion. ...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.