.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How do I customize an asp:Button class?

Posted By: Xarzu     Posted Date: April 10, 2013    Points:5   Category :ASP.Net
How do I customize an asp:Button class?

I have this bit of code in an ASPX file:

<div class="buttonContainer" style="clear:both;width:100%;text-align:left">
<asp:Button ID="btnProceed" runat="server" Text="Next" OnClick="ProceedButton_Clicked" Enabled="true" />

So, if I want to make the button bigger or bolder text, how would I do it?

Author: satyapriyanayak             
Posted Date: April 12, 2013     Points: 20   

<asp:Button ID="btnProceed" runat="server" Text="Next"
OnClick="ProceedButton_Clicked" Enabled="true" Font-Bold="True"
ForeColor="#FF9933" Height="100px" Width="200px" />

using css

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="WebApplication18.WebForm4" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
background: orange;
border: solid 1px grey;
font-family: Arial, sans-serif;
font-size: 20px;
font-weight: bold;
color: #001563;
height: 25px;
<form id="form1" runat="server">

<asp:Button id="btnProceed" CssClass="TestStyle" Text="Next" runat="server"/>

If this post helps you mark it as answer

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend