Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 23, 2013 04:36 PM by clembo67
Member
100 Points
179 Posts
Feb 23, 2013 02:11 PM|LINK
Hi Guys,
I've this html code in login page:
<div class="bottom"> <div runat="server" id="divMsgBox" class="messages blue"> <span></span> <asp:Literal runat="server" ID="Message" Text="Accesso al sistema"></asp:Literal> </div> </div>
I need to change class style when user insert wrong password.
In the code behind I've this code:
Else divMsgBox.Attributes.Add("Class", "message red") Message.Text = "wrong password" End IF
but when i Try it style div change but disappears as if it had not been set.
Why?
What I need to change?
Two style applied are similar:
.messages.red {
background : url(../gfx/system-messages.gif) no-repeat right -90px transparent;
.messages.blue { background : url(../gfx/system-messages.gif) no-repeat right -30px transparent;
If I try to set both manually all work..
Participant
902 Points
132 Posts
Feb 23, 2013 03:12 PM|LINK
In the Else case you are puting message instead of messages. Try this:
divMsgBox.Attributes.Add("Class", "messages red")
Feb 23, 2013 04:36 PM|LINK
Thankyou. I had not realized the problem
clembo67
Member
100 Points
179 Posts
changing style
Feb 23, 2013 02:11 PM|LINK
Hi Guys,
I've this html code in login page:
<div class="bottom"> <div runat="server" id="divMsgBox" class="messages blue"> <span></span> <asp:Literal runat="server" ID="Message" Text="Accesso al sistema"></asp:Literal> </div> </div>Else divMsgBox.Attributes.Add("Class", "message red") Message.Text = "wrong password" End IF.messages.red {background : url(../gfx/system-messages.gif) no-repeat right -90px transparent;
.messages.blue {
background : url(../gfx/system-messages.gif) no-repeat right -30px transparent;
If I try to set both manually all work..
Talal Tayyab
Participant
902 Points
132 Posts
Re: changing style
Feb 23, 2013 03:12 PM|LINK
In the Else case you are puting message instead of messages. Try this:
divMsgBox.Attributes.Add("Class", "messages red")clembo67
Member
100 Points
179 Posts
Re: changing style
Feb 23, 2013 04:36 PM|LINK
Thankyou. I had not realized the problem