Change style values in ASP.NET

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

I want to know that is it possible to change the values of STYLE attributes.
I want to change the position of panel object when I click a button....is it need to use STYLE to change the position.
e.g.
style="Z-INDEX: 102; LEFT: 80px; POSITION: absolute; TOP: 32px"


Million Thanks..
 
I want to know that is it possible to change the values of STYLE attributes.
I want to change the position of panel object when I click a button....is
it need to use STYLE to change the position.
e.g.
style="Z-INDEX: 102; LEFT: 80px; POSITION: absolute; TOP: 32px"

Try this (VB):

Panel1.Style.Add("Left","100px")
 
You can also try this:

Since you want to do this on the server you could just add the whole style attribute in runtime with the WebControl.Attributes.Add() in a Function or Sub and treat the values with normal variables.

/Lars Netzel

"Grey" <[email protected]> skrev i meddelandet I want to know that is it possible to change the values of STYLE attributes.
I want to change the position of panel object when I click a button....is it need to use STYLE to change the position.
e.g.
style="Z-INDEX: 102; LEFT: 80px; POSITION: absolute; TOP: 32px"


Million Thanks..
 
Back
Top