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

VB ASP.NET 2.0 td.InnerText and AJAX

I am trying to toggle the inner text of a td element using AJAX but after the button being clicked twice it stops working. Here is my code:

Expand|Select|Wrap|Line Numbers
  1. <script  runat="server">
  2.        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ToggleProjectDDL.Click
  3.         If tdCurVal_ddlCustomer.InnerText = "asp button" Then
  4.             tdCurVal_ddlCustomer.InnerText = ""
  5.         Else
  6.             tdCurVal_ddlCustomer.InnerText = "asp button"
  7.         End If
  8.     End Sub  
  9.     </script>
  10. <html>
  11. <head id="Head1" runat="server">
  12.     <title>Untitled Page</title>
  13.     </head> 
  14. <body>
  15.  
  16. <form id="Form2" runat="server">
  17.  
  18. <asp:Button ID="ToggleProjectDDL" runat="server" Text="Button" />
  19.  
  20. <asp:scriptmanager ID="scriptmanager" runat="server"></asp:scriptmanager>
  21.  
  22.  <table border = "1">
  23.  <tr>
  24.   <td>1 cell</td>  
  25.               <asp:UpdatePanel ID="UpdatePaneltdCurValddlCustomer" runat="server" UpdateMode="Conditional" RenderMode="Inline">
  26.  <ContentTemplate>
  27.  <td id="tdCurVal_ddlCustomer" runat = "server">
  28. </td> 
  29. </ContentTemplate>
  30. <Triggers>
  31.   <asp:AsyncPostBackTrigger ControlID="ToggleProjectDDL" EventName="Click" />
  32.   </Triggers>
  33. </asp:UpdatePanel>
  34. </tr>
  35. <tr>
  36.   <td>3 cell</td> 
  37.   <td>4 cell</td> 
  38. </tr> 
  39. </table>
  40. </form>
  41. </body>
  42. </html>
Any comments would be appreciated :)
Sep 11 '07 #1
0 1389

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

Similar topics

13
by: Jeff | last post by:
Hi! I'm trying to update a number in a document with the following code. It displays a number, a div block with a minus sign and a div block with a plus sign. When I click the plus sign I want...
2
by: oembuilders | last post by:
Having a bit of trouble figuring out how to get the innerText of a cell other that the one selected. Any help would be apprecated as I am very new to javascript. I got the working example from...
2
by: delraydog | last post by:
I know that innerText is not supported in FireFox and I've found the following code fragment which was originally designed in an HTMLElement prototype for an innerText getter. I do not however want...
6
by: C# newbie | last post by:
Hello group, When I run an XPATH query first as: //*[contains(translate(.,\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"abcdefghijklmnopqrstuvwxyz\")
6
by: martin | last post by:
Hi, I would like to write the text of an element to an xml doc as that it look like this <Address>&quot;Marty Jones&quot; &lt;mj@mydomain.com&gt;</Address> however I can't seen to get the quote marks to...
13
by: Lyners | last post by:
I have a web page writen in ASP.NET that contains some javascript so that when a user presses a button, or edits a certain field in a datagrid, another cell in the datagrid is filled with a value....
10
by: Angel | last post by:
I want to concat a space in an HTML Control's innerText property. here is a sample code Dim celCreate As New HtmlControls.HtmlTableCell() celCreate.innerText = " TEST" When the page is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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
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.