Solved

ASP.net buttons

Posted on 2014-04-14
2
284 Views
Last Modified: 2014-04-14
Hi
  What is the difference between the following two buttons and how can I set the BackColor to "White" and the BorderStyle to "None" for the first button?

   

   <button id="button10" class="myHoverButton">Submit</button>
           
  <asp:Button ID="Button1" CSSClass="myHoverButton" runat="server"
            Text="Who needs aesthetic dentistry" BackColor="White" BorderStyle="None"
            Font-Names="Century Gothic" ForeColor="Maroon" Font-Bold=False Width="231px" />
0
Comment
Question by:murbro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
jayakrishnabh earned 500 total points
ID: 39998702
both are server control buttons that cause the page postback on its click. since first button doesnot have runat="server" attribute, it cannot be accessed in page behind file (aspx.cs).

To set any style to only first button (id = button10), create styles with its id and dont apply class to it.

<button id="button10">Submit</button>

<style>
.myHoverButton {
            background-color: red !important;
        }
        .myHoverButton:hover {
            background-color: #9999ff !important;            
        }
        #button10 {
            background-color: white !important;
            border-style: none;
        }
</style>
0
 

Author Closing Comment

by:murbro
ID: 39998780
Thanks very much
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question