multi line text box max length

Discussion in 'ASP .Net' started by Kieran Breen, Feb 15, 2005.

  1. Kieran Breen

    Kieran Breen Guest

    Hiya,

    I was just wondering if anyone knows how to impose a maximum length on a
    muti line text box in asp.net. There is a parameter for this but even when
    its set it dosent seem to make any difference.

    Thanks in advance,

    Kieran.
     
    Kieran Breen, Feb 15, 2005
    #1
    1. Advertising

  2. Validation.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    Neither a follower nor a lender be.

    "Kieran Breen" <> wrote in message
    news:%...
    > Hiya,
    >
    > I was just wondering if anyone knows how to impose a maximum length on a
    > muti line text box in asp.net. There is a parameter for this but even when
    > its set it dosent seem to make any difference.
    >
    > Thanks in advance,
    >
    > Kieran.
    >
    >
     
    Kevin Spencer, Feb 15, 2005
    #2
    1. Advertising

  3. Kieran Breen

    Karl Seguin Guest

    Kieran:
    This question was just asked....check out
    http://www.google.com/search?hl=en&lr=&c2coff=1&q=ASP.Net multiline textbox maxlength&btnG=Search

    The first couple links should be hwat you are looking for. Multiline
    doesn't work because the html textarea doesn't support it....

    Karl
    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Kieran Breen" <> wrote in message
    news:%...
    > Hiya,
    >
    > I was just wondering if anyone knows how to impose a maximum length on a
    > muti line text box in asp.net. There is a parameter for this but even when
    > its set it dosent seem to make any difference.
    >
    > Thanks in advance,
    >
    > Kieran.
    >
    >
     
    Karl Seguin, Feb 15, 2005
    #3
  4. try this :

    txtRemarks.Attributes.Add("onkeypress","return remarksLength()");

    function remarksLength()
    {
    if (document.all('txtRemarks').value.length >= 155)
    {
    alert('Remarks cant be more than 155 characters');
    return false;
    }
    return true;
    }


    Vinay

    "Kieran Breen" wrote:

    > Hiya,
    >
    > I was just wondering if anyone knows how to impose a maximum length on a
    > muti line text box in asp.net. There is a parameter for this but even when
    > its set it dosent seem to make any difference.
    >
    > Thanks in advance,
    >
    > Kieran.
    >
    >
    >
     
    =?Utf-8?B?dmluYXk=?=, Feb 15, 2005
    #4
  5. Kieran Breen

    nataraj_mca

    Joined:
    Jun 14, 2007
    Messages:
    1
    Good

    Vinay,

    It is very simple to validate the the multiline text box,instead of using custom validations.Thanks for your good thought.


    Thanks,
    Natarajan.M
     
    nataraj_mca, Jun 14, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,071
  2. Franklin
    Replies:
    2
    Views:
    716
    William J. Familia
    Feb 20, 2009
  3. paul reed

    Limiting size of Multi-line text box

    paul reed, Dec 1, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    156
  4. Tristin Davis

    IO#Foreach -- Max line length

    Tristin Davis, Mar 6, 2008, in forum: Ruby
    Replies:
    12
    Views:
    365
    Tristin Davis
    Mar 10, 2008
  5. Replies:
    1
    Views:
    149
    gunnrosebutpeace
    Apr 17, 2008
Loading...

Share This Page