WebControl.Style and ViewState

Discussion in 'ASP .Net' started by =?Utf-8?B?TWVzYWxlbQ==?=, Jul 19, 2005.

  1. i'm creating a text box dynamically in the page load and on the client side i
    use the following script to hide the control

    document.getElementById('dynamicText').style.display='none';
    document.getElementById('dynamicText').style.visibility='hidden';

    after a post back the control is displayed again
    i examined the WebControl.Style properties and found that it's not affected
    by the client script, so how can i handle this??

    thanks in advance,
    Mesalem
     
    =?Utf-8?B?TWVzYWxlbQ==?=, Jul 19, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?TWVzYWxlbQ==?=

    Teemu Keiski Guest

    Yes, server-side doesn't know about those changes made at client-side. It
    needs to be informed somehow if it needs to do something about it.

    You would need to provide that info to the server say via hidden form fields
    or equivalent (e.g do it during a postback) so that the control can be
    hidden at the server (if that's required). otherwise you'd need to rehide it
    at the client.

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke
     
    Teemu Keiski, Jul 19, 2005
    #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. Guest
    Replies:
    2
    Views:
    754
  2. Ken Varn
    Replies:
    0
    Views:
    525
    Ken Varn
    Apr 26, 2004
  3. Luis Ramírez.

    Can a webcontrol (webcontrol.dll) have a configuration file?

    Luis Ramírez., Jul 5, 2004, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    216
    Luis Ramírez
    Jul 6, 2004
  4. Kasabaarde Sumta

    WebControl inside of WebControl and attaching events

    Kasabaarde Sumta, Dec 13, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    211
    Kasabaarde Sumta
    Dec 13, 2004
  5. Mesalem

    WebControl.Style and ViewState

    Mesalem, Jul 19, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    153
    Brock Allen
    Jul 19, 2005
Loading...

Share This Page