Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > WebControl.Style and ViewState

Reply
Thread Tools

WebControl.Style and ViewState

 
 
Mesalem
Guest
Posts: n/a
 
      07-19-2005
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.displ ay='none';
document.getElementById('dynamicText').style.visib ility='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

 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      07-19-2005
You will need to send something to the server to tell it to do the same thing
that was done in your client javascript. Pehrpas a hidden field of your own?
Page.RegisterHiddenField will gen one for you. Have your script fill this
in and then on the postback inspect it to know how to set the stype on the
server.

-Brock
DevelopMentor
http://staff.develop.com/ballen



> 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.displ ay='none';
> document.getElementById('dynamicText').style.visib ility='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




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with ViewState: "function 'ViewState.get_Item' evaluated and returned null" Steph ASP .Net 2 05-11-2011 02:35 PM
Errors: Failed to load viewstate. & Validation of viewstate MAC failed. sck10 ASP .Net 6 09-01-2006 05:59 PM
Loading usercontrols, viewstate problem, slighly different from all others "viewstate uc problems" please help... ujjc001 ASP .Net 0 07-27-2005 01:52 PM
Viewstate errors... how do I get viewstate working? mark ASP .Net Building Controls 0 02-20-2004 02:17 PM
Corrupted ViewState (Yes, another issue concerning viewstate) Ben Rush ASP .Net 2 12-05-2003 04:17 PM



Advertisments