ASP.NET - CSS style change when im clicking link button
Asked By Kaleem Khan
09-Feb-10 12:55 AM
i have two sets of css,
CSS1
.maroonlinks_my:link
{ font-family: Tahoma; font-size: 9pt; font-weight: normal; color: #B5121B; text-decoration: underline;}
.maroonlinks_my:hover
{font-family: Tahoma;font-size: 19pt;font-weight: normal;color: #000000;text-decoration: none;}
.maroonlinks_my:active
{font-family: Tahoma;font-size: 29pt;font-weight: normal;color: #000000;text-decoration: none;}
.maroonlinks_my:visited
{font-family: Tahoma;font-size: 59pt;font-weight: normal;color: #000000;text-decoration: none;}
CSS2
.maroonlinks
{font-family: Tahoma;font-size: 9pt;font-weight: normal;color: #B5121B;text-decoration: underline;}
.maroonlinks:hover
{font-family: Tahoma;font-size: 9pt;font-weight: normal;color: #000000;text-decoration: none;}
default link button css is maroonlinks ie CSS2
and i placed a link button in a form, when im clicking link button it should change into maroonlinks_my ie CSS1
please reply soon
Huggy Bear replied to Kaleem Khan
In the Button click event, set the style dynamically as shown
button1.CssClass = "CSS1";
Santhosh N replied to Kaleem Khan
You could actually change the class of any element as
Object.CssClass=YourClass;
or
Object.Attributes.Add("Class",YourClass);
assuming you have both css files loaded and referenced...
Adil Saud replied to Kaleem Khan
Hi,
Suppose your link button name is : lnkMyButton. and your asp.net button tag might be like this :
<asp:LinkButtin id="lnkMyButton" runat="Server" onClientClick="changeStyle(this);"></asp:LinkButton>
Javascript to change the style is :
<script language ="javascript" type="text/script">
function changeStyle(obj)
{
if(obj!=null)
{
obj.className='maroonlinks_my';
}
}
</script>
Hope this help...
THnx:))
Adl...

Net hi friends Any one send frequently asked Important questions in C# .Net, ADO .Net, Asp .Net and Sql Server. . . . . . . . tx in Advance. . . . . . Hi, Find this. . (B)What is an IL? (B How can we know a state of a thread? (A) What is use of Interlocked class ? (A) What is a monitor object? (A) What are wait handles? (A) What is ManualResetEvent and Webservices (B)What is an application domain? (B) What is .NET Remoting? (B) Which class does the remote object has to inherit? (I) what are two different types of remote A) What is scavenging? (B) What are different types of caching using cache object of ASP.NET? (B) How can you cache different version of same page using ASP.NET cache object? (A) How will implement Page Fragment Caching? (B) Can you compare ASP.NET
change font size of validation summary box hi everybody am using hindi script for one application and i have given some validation to textboxes . . . . . . .in messagebox the font size is too small how to increse the font size .plzzzz help me . तोल सफलतापूर्वक पंजीकृत this text is displaying in XXsmall font size , help me out plzzz hi, try this and let me know < asp:ValidationSummary ID Save" ShowMessageBox = "true" ShowSummary = "false" HeaderText = "You must enter a value in the following fields:" Font-Names = "verdana" Font-Size = "50" / > Change the font-size property: < asp : TextBox ID = "UserName" runat = "server" > < / asp : TextBox > < asp : RequiredFieldValidator ID
The key line here is: bmpBitmap1.RotateFlip(RotateFlipType.Rotate90FlipX) The RotateFlip method of the Bitmap class is inherited from the Image class and takes as its parameter one of the 16 members of the enumeration RotateFlipType. Rotate90FlipX image name from other form i.e. dynamic. and also i want it through a button click. help me. Thankx Richa Hi Richa, I assume you want to rotate the image name = "Author" content = "Chandra Vedantham"> <meta name = "Description" content = "Html Page"> <link rel = "stylesheet" href = "style.css" / > <script> function ChangeImage(srcImg) { } < / script> <style> .imgs { writing-mode: tb-rl; filter: flipH(); } < / style> < / head> <body> <input type = "button" value = "Rotate 360 Degrees" onClick = "imgSrc.filters.item(0).rotation = 0" / > <input type = "button" value
page good morning friends i developed a web page .In this page i taken a button and when i click on button it takes some time to show the result due to mass of data.So i that the system is busy . What we have to do. Please support me regards chandan CSS style as ASP.NET AJAX progress indicator AJAX , ASP.NET , CSS , UI By Dave Ward ; Updated October 15, 2008 Update Panel with Animation I noticed