Create web form [Default2.aspx] and copy paste the source code in it
<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default2.aspx.cs” Inherits=”Default2″ %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
//**** for master page the control name will be changed so you can access those name under source code.
//**** it could be –> ctl00$ContentPlaceHolder1$txt_commnets so u have to change it where u will use the textbox.
//**** and form name could be –> aspnetForm instead of Form1
var max=50; // 50 = max characters // we can set according to our need.