Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

Textbox with multiline keypress event not firing inside wizard control

$
0
0

Hi,

I have a textbox with multiline in a wizard control:

<asp:TextBox ID="txtCA" TextMode="MultiLine" runat="server" Height="100px" Width="400px"></asp:TextBox>

The textxtbox is is second step of wizard i.e Navigation step. I want to limit the no. of characters entered in textbox.

Jquery:

<script type="text/javascript" language="javascript">$(document).ready(function () {
        var MaxLength = 10;$('#<%= txtCA.ClientID %>').keypress(function (e) {
            if ($(this).val().length >= MaxLength) {
                e.preventDefault();
            }
        });
        });</script>

But's its not working, what could be the reason ?


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>