how to change dynamically 'oncontextmenu' property of <body>?

Discussion in 'ASP .Net' started by Luc, Nov 15, 2009.

  1. Luc

    Luc Guest

    Hi,

    in the aspx file, there is following code:
    <body oncontextmenu="return false" id="bod1" runat="server">

    Now i want to change it dynamically (vb.net)
    I typied this: bod1.
    hoping the property 'oncontextmenu' would appear behind the dot but it didn't.

    Any idea how to do that?
    Thanks
    Luc
     
    Luc, Nov 15, 2009
    #1
    1. Advertising

  2. "Luc" wrote
    > in the aspx file, there is following code:
    > <body oncontextmenu="return false" id="bod1" runat="server">
    >
    > Now i want to change it dynamically (vb.net)
    > I typied this: bod1.
    > hoping the property 'oncontextmenu' would appear behind the dot but it
    > didn't.
    >
    > Any idea how to do that?


    bod1.Attributes("oncontextmenu")="whatever"

    Andrew
     
    Andrew Morton, Nov 15, 2009
    #2
    1. Advertising

  3. Luc

    Luc Guest

    thanks

    "Andrew Morton" <> schreef in bericht
    news:...
    > "Luc" wrote
    >> in the aspx file, there is following code:
    >> <body oncontextmenu="return false" id="bod1" runat="server">
    >>
    >> Now i want to change it dynamically (vb.net)
    >> I typied this: bod1.
    >> hoping the property 'oncontextmenu' would appear behind the dot but it
    >> didn't.
    >>
    >> Any idea how to do that?

    >
    > bod1.Attributes("oncontextmenu")="whatever"
    >
    > Andrew
     
    Luc, Nov 15, 2009
    #3
    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. Chris Tomlinson
    Replies:
    9
    Views:
    499
    Randy Webb
    Jul 25, 2006
  2. Terri I.
    Replies:
    0
    Views:
    116
    Terri I.
    Aug 13, 2003
  3. Thomas
    Replies:
    4
    Views:
    201
    DJ WIce
    Jan 27, 2004
  4. johkar
    Replies:
    2
    Views:
    80
    johkar
    Dec 14, 2004
  5. johkar
    Replies:
    0
    Views:
    87
    johkar
    Dec 14, 2004
Loading...

Share This Page