asp.net client side question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey all,

is it possible to make a webcontrol.visible=false without using postback?

i mean, is there a client-side script way of making a control invisible?

thanks,
rodchar
 
Yes and No.

Yes because you can simulate the effect, No because it isn't exactly what
Webcontrol.visible = false would do.

By setting a webcontrol.visible = false, you essentially don't send anything
to the client.

But you can simply hide it on the client side by using Javascript and
setting the style attribute as <div style="visible:false">your stuff</div>.

(Ok my memory is a little hazy, but it was either visible:false, or
display:none .. .. sump'n like that). Good reference site - www.htmlguru.com
; that guy uses this trick all over the place.

- Sahil Malik
You can reach me thru my blog at
http://www.dotnetjunkies.com/weblog/sahilmalik
 
use
document.getElementById("<elementname>").visible = false;
in javascript

where <elementname> is the name of a control, e.g. <asp:TextBox
runat="server"....... />



Cheers
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

variable persistence 8
drop down list change event 4
client and server 3
client vs server side 3
client side way 2
javascript confirm() and validation 5
worksheets side-by-side 2
validation 2

Back
Top