Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

REALLY FRUSTRATING, Please help!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vittorix - 19 Dec 2007 23:34 GMT
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
Scott M. - 20 Dec 2007 00:33 GMT
Probably a good idea not to start with "riepilogate".  You scared me away
from reading the rest of your post after seeing that!

>I riepilogate with corrections and updates:
>
[quoted text clipped - 94 lines]
> ciao
> Vittorix
Mark Rae [MVP] - 20 Dec 2007 00:44 GMT
> 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"...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Vittorix - 20 Dec 2007 02:26 GMT
>> 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

Signature

ciao
Vittorix

Vittorix - 20 Dec 2007 02:25 GMT
> Probably a good idea not to start with "riepilogate".

sorry :)
Now can I get some help?

Signature

ciao
Vittorix


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.