Client Side Script and Custom Control

Discussion in 'ASP .Net' started by =?Utf-8?B?SGFyb2xkcw==?=, Sep 23, 2004.

  1. How do I access the properties of my custom control in client side script?
    i.e.:

    <%@ Register TagPrefix="custom" Namespace="MyNamespace.MyControl"
    Assembly="MyNamespace.MyControl, Version=1.6.0.1, Culture=neutral,
    PublicKeyToken=68358b8147b5eae4" %>

    ....

    <HTML>
    <HEAD>
    ....

    <script id=clientEventHandlersVBS language=vbscript>
    <!--

    Sub window_onbeforeprint
    '''''''''''''here is an examble of what I might want to do'''''''''''''''
    MyCont.Visible = false
    End Sub

    -->
    </script>
    </HEAD>
    <body>
    <form id="Form1" method="post" runat="server">
    <custom:mycontrol id=MyCont runat="server" ForeColor="Black"
    BackColor="White" Width="500px"></custom:mycontrol>

    ....

    </body>
    </HTML>
    =?Utf-8?B?SGFyb2xkcw==?=, Sep 23, 2004
    #1
    1. Advertising

  2. What does your control render itself as? You can access it via the
    "ID".blah() calls as long as that is supported by the rendered type..


    --
    Girish Bharadwaj
    http://msmvps.com/gbvb
    "Harolds" <> wrote in message
    news:...
    > How do I access the properties of my custom control in client side script?
    > i.e.:
    >
    > <%@ Register TagPrefix="custom" Namespace="MyNamespace.MyControl"
    > Assembly="MyNamespace.MyControl, Version=1.6.0.1, Culture=neutral,
    > PublicKeyToken=68358b8147b5eae4" %>
    >
    > ...
    >
    > <HTML>
    > <HEAD>
    > ...
    >
    > <script id=clientEventHandlersVBS language=vbscript>
    > <!--
    >
    > Sub window_onbeforeprint
    > '''''''''''''here is an examble of what I might want to do'''''''''''''''
    > MyCont.Visible = false
    > End Sub
    >
    > -->
    > </script>
    > </HEAD>
    > <body>
    > <form id="Form1" method="post" runat="server">
    > <custom:mycontrol id=MyCont runat="server" ForeColor="Black"
    > BackColor="White" Width="500px"></custom:mycontrol>
    >
    > ...
    >
    > </body>
    > </HTML>
    Girish Bharadwaj, Sep 23, 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. Shawn Mehaffie
    Replies:
    4
    Views:
    656
    Shawn Mehaffie
    Jan 22, 2004
  2. Magnus Blomberg
    Replies:
    3
    Views:
    705
    Magnus Blomberg
    Apr 14, 2005
  3. Boss302
    Replies:
    0
    Views:
    1,023
    Boss302
    Nov 21, 2006
  4. Bogdan
    Replies:
    2
    Views:
    639
    Bogdan
    Jun 9, 2008
  5. Zoe Hart
    Replies:
    1
    Views:
    354
    Scott Wisniewski
    Jan 8, 2004
Loading...

Share This Page