css problem

  • Thread starter Thread starter CreativeMind
  • Start date Start date
C

CreativeMind

<style>
..Admin{
display: <%if( Convert.ToInt32(userType) !=1)?%>"inline"<%:%>"none"
}
</style>
please correct the syntax.
thx
 
Are you using VB or C#?

Cause you kind of mixing both....
I do not know VB very well but I think there is no such construction like

if( Convert.ToInt32(userType) !=1)?

in C# it's (notice no IF)
(logical statement)?opertaotr:operator;

So it should be
(Convert.ToInt32(userType)
!=1)?Response.Write("inline"):Response.Write("none");

Not sure if inline (like below) code will work though
<%( Convert.ToInt32(userType) !=1)?%>"inline"<%:%>"none"<%;%>"

George
 
thx..i solved it.
Are you using VB or C#?

Cause you kind of mixing both....
I do not know VB very well but I think there is no such construction like

if( Convert.ToInt32(userType) !=1)?

in C# it's (notice no IF)
(logical statement)?opertaotr:operator;

So it should be
(Convert.ToInt32(userType)
!=1)?Response.Write("inline"):Response.Write("none");

Not sure if inline (like below) code will work though
<%( Convert.ToInt32(userType) !=1)?%>"inline"<%:%>"none"<%;%>"

George
 
Back
Top