Results 1 to 3 of 3

Thread: Inclick and Label

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Question Inclick and Label

    This is a refomulation of a prior question. How can I make the sub panelHp to work, when I click the link?
    I've tried using "handles lblhp.click" in the sub without any luck.
    Does any of you know any code for menus using vb.net instead of JavaScript?

    Code:
    <%@ Page Language="VB" %>
    <script runat="server">
    
        Sub panelhp(sender As Object,e As EventArgs) 
            lblhp.text = "Writing"
        end sub
    
    </script>
    <html>
    <head>
    </head>
    <body>
        <form runat="server">
            <table>
                <!-- Hauptnavigation Menupunkt 1 -->
                <tbody>
                    <tr>
                        <td class="navlow" onmouseover="this.style.backgroundColor='#0057AE';" onmouseout="this.style.backgroundColor='#3366CC';" valign="center" height="15">
                            <ILAYER>
                                <LAYER id="lay1" onmouseover="lay1.bgColor='#0057AE';" onmouseout="lay1.bgColor='#3366CC';">
                                    <img height="15" src="space_clr_5_15.gif" width="5" align="middle" border="0" /><a class="hauptnav" href="???">Expansion/Contraction</a><img height="15" src="space_clr_5_15.gif" width="5" border="0" /> 
                                </LAYER>
                            </ILAYER>
                        </td>
                    </tr>
                </tbody>
            </table>
            <asp:label id=lblHp text="Test" runat="server"/>
        </form>
    </body>
    </html>

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    A Label control does not support a click event. Look at the LinkButton or HyperLink.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049
    OK, thanks I've used a button with borderwidth=0px. Are you sure that <asp:hyperlink/> works? I've tried but I receive an error. I have not tried with the <asp:linkbutton/>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width