Button1 resemble an HTML input button... Button1 resemble an HTML input button... Button1 resemble an HTML input button...

Make ASP button resemble HTML button

224 Views Asked by At

Does anyone know a way to make an asp button...

<asp:button runat="server">Button1</asp:button>

resemble an HTML input button...

<input type="button" value="Button2"/>

(or vice versa) in Visual Studio 2003?

2

There are 2 best solutions below

1
Desi On BEST ANSWER

I think you'll need to modify your CSS. Here is something that may help get you going;

input.link
{
  border: none;
  background-color: transparent;
  padding: 0px;
  margin: 0px;
  color: #0000ff;
}

a.button
{
  border: 1px solid #a9a9a9;
  padding: 3px 8px 3px 8px;
  background-color: #dbdbdb;
  text-decoration: none;
  color: #000000;
}

Then update your markup to look something like this;

<input type="submit" class="link" value="Submit" />

<%= Html.ActionLink("Cancel", "QuoteList", "Quote", new { @class = "button" })%>

This is just off the top of my head so I hope that helps.

2
Mike Mengell On

Are you missing the runat="server" attribute in your code?