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

Problems with AJAX in ASP.Net

132 100+
Hi there. I have created an asp.net page with C# and have added two tabs using the respective AJAX control.

I am trying to add a table within an AJAX Accordion control in the second tab but I am running into problems where the two accordian entries are not functioning correctly. If I don't use a table and just place some sample text within the accordian body then this works okay but once I add the table, the second accordion value appears on the first tab page and the links in the second tab (and hence the accordion) do not respond.

Here is the code so far:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <%@ Page Title="Address Search" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
  3. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
  4. <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  5. </asp:Content>
  6. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  7.     <cc1:ToolkitScriptManager ID="ScriptManager1" runat="server" />
  8.     <cc1:TabContainer ID="TabContainer1" runat="server">
  9.        <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Address Search">
  10.             <ContentTemplate><br />
  11.             <table align="center">
  12.             <b>Address Details:</b> 
  13.                 <tr>
  14.                     <td>&nbsp;</td>
  15.                 </tr>
  16.                 <tr>
  17.                     <td><asp:Label ID="Label1" runat="server" Text="House No:"></asp:Label></td>
  18.                     <td><asp:TextBox ID="txtNumber" runat="server" Width="140px"></asp:TextBox></td>
  19.                 </tr>
  20.                 <tr>
  21.                     <td><asp:Label ID="Label2" runat="server" Text="Street:"></asp:Label></td>
  22.                     <td><asp:TextBox ID="txtStreet" runat="server" Width="380px"></asp:TextBox></td>
  23.                 </tr>
  24.                 <tr>
  25.                     <td><asp:Label ID="Label5" runat="server" Text="Post Code:"></asp:Label></td>
  26.                     <td><asp:TextBox ID="txtPostCode" runat="server" Width="140px"></asp:TextBox></td>
  27.                 </tr>
  28.                 <tr>
  29.                     <td>&nbsp;</td>
  30.                 </tr>
  31.                 <tr>
  32.                     <td><b>Select run type:</b></td>
  33.                     <td><asp:Label ID="lblNLPG" runat="server" Text="NLPG"></asp:Label>
  34.                         <asp:CheckBox ID="cbNLPG" runat="server" />
  35.                         <asp:Label ID="lblLLPG" runat="server" Text="LLPG"></asp:Label>
  36.                         <asp:CheckBox ID="cbLLPG" runat="server" />
  37.                     </td>
  38.                 </tr>
  39.                 <tr>
  40.                     <td>&nbsp;</td>
  41.                 </tr>
  42.                 <tr>
  43.                     <td><asp:Label ID="Label7" runat="server" Text="Get Address Details"></asp:Label></td>
  44.                     <td><asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="Search" /></td>
  45.                 </tr>
  46.                 <tr><td>&nbsp;</td>
  47.                 </tr>
  48.                 <tr>
  49.                     <td>Results:</td>
  50.                     <td><asp:ListBox ID="lbResults" runat="server" Height="134px" Width="380px"></asp:ListBox></td>
  51.                 </tr></caption>
  52.             </table><br />
  53.             <table align="center">
  54.                 <tr>
  55.                     <td><asp:Label ID="lblTime" runat="server" Text="Elapsed time:" Visible="False"></asp:Label></td>
  56.                     <td><asp:TextBox ID="txtTime" runat="server" Width="50px" Visible="False"></asp:TextBox></td>
  57.                 </tr>
  58.              </table>
  59.             </ContentTemplate>
  60.        </cc1:TabPanel>
  61.  
  62.        <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="LLP Extract">
  63.             <ContentTemplate>
  64.                 <table align="center">
  65.                 <cc1:Accordion ID="Accordion1" runat="server" SelectedIndex="0" FadeTransitions="true" FramesPerSecond="40" TransitionDuration="250" AutoSize="None" 
  66.                                 HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected"
  67.                                 ContentCssClass="accordionContent">
  68.                     <Panes>
  69.                         <cc1:AccordionPane ID="AccordionPane1" runat="server">
  70.                         <Header>
  71.                             <a href="" onclick="return false;" style="color: #C0C0C0">Parameters</a>
  72.                         </Header>
  73.                         <Content>
  74.                             <table>
  75.                                 <tr>
  76.                                     <td>
  77.                                         Some Data 1
  78.                                     </td>
  79.                                 </tr>
  80.                             </table>
  81.                         </Content>
  82.                         </cc1:AccordionPane>
  83.                         <cc1:AccordionPane ID="AccordionPane2" runat="server">
  84.                         <Header>
  85.                             <a href="" onclick="return false;" style="color: #C0C0C0">Results</a>
  86.                         </Header>
  87.                         <Content>
  88.                             Some data 2
  89.                         </Content>
  90.                         </cc1:AccordionPane>
  91.                     </Panes>
  92.                 </cc1:Accordion>
  93.              </table>   
  94.             </ContentTemplate>
  95.        </cc1:TabPanel>   
  96.     </cc1:TabContainer>
  97. </asp:Content>
  98.  
  99.  
Hopefully I am missing something really simple here and your help will be much appreciated, please?

Thank you.

M :)
Jan 9 '09 #1
1 2118
E11esar
132 100+
Hi there, again. I worked this one out: the answer was not to have the actual AJAX Accordion control within the <table> tabs,

i.e.

Expand|Select|Wrap|Line Numbers
  1. <ContentTemplate> 
  2.     <table align="center"> 
  3.         <cc1:Accordion ID
  4.  
This then solved the matter.

Thank you.

M :)
Jan 10 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
9
by: RBM007 | last post by:
Hello, I have created some pages in the (old) Atlas pages and migrated to AJAX version. After the update I noticed that any page containing ASP.NET AJAX won't compile anymore. Even if the same...
10
by: celoftis | last post by:
Using VS 2005: This morning, following the instructions here: http://ajax.asp.net/docs/overview/InstallingASPNETAJAX.aspx, I installed ASP.NET AJAX on my WinXP Pro development machine. Following...
3
by: noballack | last post by:
I've got a problem, I'm working with Ajax in a web with a form with a list of checkbox added to the form via an Ajax.Updater method. These added checkboxs are not been sended by the form if I use...
3
by: Steve Kershaw | last post by:
Hey, I have a master.page and a Default.aspx page. I'm trying to use AJAX to postback to the server. However, when I place the <asp:ScriptManager ...tag on the Default.aspx page I get an "Element...
1
by: david | last post by:
First of all, small example: function GetURL() { new Ajax.Request('/updater.php?GetURL=yes', { method:'get', onSuccess: function(transport){ response = transport.responseText;...
1
by: lir | last post by:
I'm stuck with a problem, basically the code works fine in MOZILLA. I call from a <select> tag a ajax.update and successfully it show up everything. However using IE the <select> tag is...
3
by: PeakConsulting | last post by:
The use of Ajax instead of Javascript has any disadvantages? I mean browser problems, SEO problems, CMS problems
4
by: srkidd12 | last post by:
Hello, I am having problems with using AJAX to call information to my primary ASP page from a secondary asp page that brings in the data I want to display. I'm having the onfocus event trigger...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.