mardi 24 juin 2014

LinkButton color not changing


Vote count:

0




I have a user control which has a linkbutton. On the link button click, I am redirecting to the default page. The default page uses this user control. I am trying to set the color of the linkbutton to purple, if visited. I this this is not working because of the page post back which is happening. I tried to google this, but was not sucessfull in finding the answer. I understand for those of you asp.net experts, this might be a basic question. I am an absoloute beginner. So, please bare with me. Below is my code.



void LinkButton_Click(Object sender, EventArgs e)
{
Response.redirect("~/Default.aspx")
}


Css



.d:hover{
color:green;
}

.d:visited{
color:purple;
}
</style>


It's don't think it is the css problem because when I hover, the color changes to green. The visited link color does not change. Is it because the page is being rendered again on the link button click? How would I fix this. Thanks in advance.



asked 47 secs ago






Aucun commentaire:

Enregistrer un commentaire