Monday, September 26, 2022

Adding an image and text both in asp.net button

  <asp:Button ID="btnTestSample"   Width="35"    Height="25" runat="server" Text="lb"  CssClass="cssTestSample"   />

 <style type="text/css">

    .cssTestSample{

        border: 1px solid #563d7c;

        border-radius: 5px;

        padding:     0px 25px 0px 3px;

        background: url(../Images/MyTestImage.png) 

            left 18px top 5px  no-repeat ;

   }


No comments:

Post a Comment

Generate Random Numbers in .NET6

 We can generate random number using the following code: Console.WriteLine("Generate Randoms!"); var objRandom = new Random(); var...