BUG: commented out server side controls in html still run

Discussion in 'ASP .Net' started by =?Utf-8?B?YWRvbGYgZ2FybGlj?=, Nov 22, 2004.

  1. The following control still runs
    <!--<asp:linkbutton id="Test" runat="server" text="Create Text file"
    onclick="Test_Click" />-->

    if you change the "asp" to "zsp" the page fails immediately.

    this is a bug
     
    =?Utf-8?B?YWRvbGYgZ2FybGlj?=, Nov 22, 2004
    #1
    1. Advertising

  2. Re: commented out server side controls in html still run

    "adolf garlic" <> wrote in message
    news:...
    > The following control still runs
    > <!--<asp:linkbutton id="Test" runat="server" text="Create Text file"
    > onclick="Test_Click" />-->
    >
    > if you change the "asp" to "zsp" the page fails immediately.


    No, it's not. It's documented. Use server-side comments to hide server-side
    code:

    <%-- <button runat="server" id="MyButton" OnServerClick="MyButton_Click">
    Click here for enlightenment!
    </button>
    --%>

    Note that they cannot be nested.

    John Saunders
     
    John Saunders, Nov 22, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Heavey
    Replies:
    1
    Views:
    386
    Oisín Grehan
    Dec 2, 2003
  2. Rod Snyder

    commented out form tag causing error

    Rod Snyder, Sep 13, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    363
    Rod Snyder
    Sep 14, 2005
  3. bronski
    Replies:
    0
    Views:
    462
    bronski
    Feb 16, 2005
  4. Amil Hanish
    Replies:
    1
    Views:
    323
    Juan T. Llibre
    Aug 25, 2006
  5. Allen
    Replies:
    11
    Views:
    414
    Allen
    Jul 5, 2009
Loading...

Share This Page