Issue with Control.Attributes Property when adding Javascript

Discussion in 'ASP .Net' started by ChrisMiddle10@gmail.com, Oct 12, 2006.

  1. Guest

    Sorry to bother everyone with this question, but the answer to this the
    question is difficult to search for. I want to add javascript to an
    HtmlInputButton control attribute. A portion of the javascript goes
    something like this:

    if( x < y && x != y )
    {
    // do something
    }

    It is rendered as follows:

    if( x &lt; y &amp;&amp; x != y )
    {
    // do something
    }

    How do I preserve the literal "<" and "&"?

    Thanks a lot!
     
    , Oct 12, 2006
    #1
    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. Nathan Sokalski
    Replies:
    8
    Views:
    4,622
    Raymond
    Mar 1, 2006
  2. Replies:
    6
    Views:
    375
  3. Nathan Sokalski
    Replies:
    0
    Views:
    390
    Nathan Sokalski
    Jan 8, 2008
  4. Zarko Gajic

    Custom Attributes (AttributeTargets.Property) and Property Type

    Zarko Gajic, Apr 7, 2005, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    437
    Zarko Gajic
    Apr 7, 2005
  5. Nathan Sokalski

    Requirements for using Control & Property Attributes in ASP.NET

    Nathan Sokalski, Jan 8, 2008, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    809
    Nathan Sokalski
    Jan 8, 2008
Loading...

Share This Page