css problem

C

CreativeMind

<style>
..Admin{
display: <%if( Convert.ToInt32(userType) !=1)?%>"inline"<%:%>"none"
}
</style>
please correct the syntax.
thx
 
G

George Ter-Saakov

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:eek:perator;

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
 
C

CreativeMind

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:eek:perator;

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
 

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

Members online

Forum statistics

Threads
474,174
Messages
2,570,940
Members
47,484
Latest member
JackRichard

Latest Threads

Top