Here with the use of Javascript we can achieve this task. please check this below code.
Code for ASP page
<head>
<script LANGUAGE="JavaScript">
function textCounter(field,cntfield,maxlimit)
<script LANGUAGE="JavaScript">
function textCounter(field,cntfield,maxlimit)
{
if (field.value.length > maxlimit)
if (field.value.length > maxlimit)
{
field.value = field.value.substring(0, maxlimit);
}
else
field.value = field.value.substring(0, maxlimit);
}
else
{
cntfield.value = maxlimit -
field.value.length;
}
}
>
>
<body>
<asp:TextBox ID="txtFeatures" runat="server" TextMode="MultiLine"
Columns="28" Rows="5" Wrap="true" />
<br />
<input readonly type="text" name="remLen1" id="remLen1" size="3"
maxlength="3" value="90" />
cntfield.value = maxlimit -
field.value.length;
}
}
>
>
<body>
<asp:TextBox ID="txtFeatures" runat="server" TextMode="MultiLine"
Columns="28" Rows="5" Wrap="true" />
<br />
<input readonly type="text" name="remLen1" id="remLen1" size="3"
maxlength="3" value="90" />
No comments:
Post a Comment