Posts

Showing posts with the label ASP.NET

Apply Style to Every Control on Website in ASP.NET

Introduction I guess you are expert in styling controls using CSS. But the thing I am going to talk in this post is bit different. Let's look at following asks: (i) How to apply style to all Label controls on website? (ii) How to apply TextBox background color or font color (ForeColor) to all controls on websites? (iii) How to apply style to all Hyperlink controls on website? To answer these all question let's read this. Follow the steps:- Step 1 Create a style sheet page by name 'SiteStyle.css' and save this under project root. Step 2 Type following style information in SiteStyle.css page:         span:hover         {             font-size : 12px ;             font-style : oblique ;         }                 input         {             background-color : #999999 ;             color : Blue ;         }                 a:hover         {             color : Green ;         } Please note: I am usi

Character Limiting in TextBox in ASP.NET using jQuery and display red when reaches out of limit

Image
Introduction Download Look at the images given blow that you frequently see on websites. In this post you are going to learn this. Screen when character reaches out of limit:- Follow the steps to create such system. Step 1 Add the reference of the jQuery file in head section of web page, for example:     < script type ="text/javascript" src ="Scripts/jquery-1.4.1.min.js"></ script > Step 2 Add the following jQuery method in head section of web page:     < script type ="text/javascript" language ="javascript">         $(document).ready( function () {             var txt = $( "textarea[id$=txtComments]" );             var txtMsg = $( "label[id$=txtStatus]" );             $(txt).keyup( function () {                 var length = $(txt).val().length;                 $(txtMsg).text( "Total " + length + " Characters out of 200.&

Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity

Customize User's Profile in ASP.NET Identity System

Lambda two tables and three tables inner join code samples