Text Box Control MaxLenght Property Is Not Working

Discussion in 'ASP .Net' started by Dhana, Dec 31, 2005.

  1. Dhana

    Dhana Guest

    Hi All,

    I have developed one web application.
    In that I used aspnet web textBox control.
    I have set maxlength property for that text box 300 and TextMode property as
    multiline .

    When i typed more than 3 or 4 line each line contains 30 to 40 characters,
    If i clicked button for passing textbox value, that time my web page is not
    responsding (no action taken).

    The same page without refereshing if i delete some characters from my
    textbox.
    It is working.

    Can someone help me for this?

    --
    Regards,
    Dhana
     
    Dhana, Dec 31, 2005
    #1
    1. Advertising

  2. Dhana

    Sosh Guest

    Dhana,

    What browser are you using?

    "Dhana" <> wrote in message
    news:...
    >
    > Hi All,
    >
    > I have developed one web application.
    > In that I used aspnet web textBox control.
    > I have set maxlength property for that text box 300 and TextMode property
    > as multiline .
    >
    > When i typed more than 3 or 4 line each line contains 30 to 40 characters,
    > If i clicked button for passing textbox value, that time my web page is
    > not responsding (no action taken).
    >
    > The same page without refereshing if i delete some characters from my
    > textbox.
    > It is working.
    >
    > Can someone help me for this?
    >
    > --
    > Regards,
    > Dhana
    >
    >
    >
     
    Sosh, Dec 31, 2005
    #2
    1. Advertising

  3. A TextBox in MultiLine mode is rendered as a TextArea HTML control. TextArea
    as opposed to an Imput control does not have a maxlength property. It will
    be ignored in the TextBox.

    There are some 3rd party controls and projects out there that attempt to
    control length with javascript for a multiline textbox. I haven't used any
    of them so can't comment.

    --

    Andrew Robinson
    www.binaryocean.com
    www.bellinghamdotnet.org


    "Dhana" <> wrote in message
    news:...
    >
    > Hi All,
    >
    > I have developed one web application.
    > In that I used aspnet web textBox control.
    > I have set maxlength property for that text box 300 and TextMode property
    > as multiline .
    >
    > When i typed more than 3 or 4 line each line contains 30 to 40 characters,
    > If i clicked button for passing textbox value, that time my web page is
    > not responsding (no action taken).
    >
    > The same page without refereshing if i delete some characters from my
    > textbox.
    > It is working.
    >
    > Can someone help me for this?
    >
    > --
    > Regards,
    > Dhana
    >
    >
    >
     
    Andrew Robinson, Dec 31, 2005
    #3
  4. Dhana

    Sosh Guest

    Ah yeah...

    Try using a javscript function like:

    function limitTextarea(textarea, maxlength) {
    if (textarea.value.length > maxlength)
    textarea.value = textarea.value.substring(0, maxlength);
    }

    and set the onchange attribute (either programatically with
    textbox.attribute.add() or declaratively) on the textbox to call the
    function.

    "Andrew Robinson" <> wrote in message
    news:%23FQJ$...
    >A TextBox in MultiLine mode is rendered as a TextArea HTML control.
    >TextArea as opposed to an Imput control does not have a maxlength property.
    >It will be ignored in the TextBox.
    >
    > There are some 3rd party controls and projects out there that attempt to
    > control length with javascript for a multiline textbox. I haven't used any
    > of them so can't comment.
    >
    > --
    >
    > Andrew Robinson
    > www.binaryocean.com
    > www.bellinghamdotnet.org
    >
    >
    > "Dhana" <> wrote in message
    > news:...
    >>
    >> Hi All,
    >>
    >> I have developed one web application.
    >> In that I used aspnet web textBox control.
    >> I have set maxlength property for that text box 300 and TextMode property
    >> as multiline .
    >>
    >> When i typed more than 3 or 4 line each line contains 30 to 40
    >> characters,
    >> If i clicked button for passing textbox value, that time my web page is
    >> not responsding (no action taken).
    >>
    >> The same page without refereshing if i delete some characters from my
    >> textbox.
    >> It is working.
    >>
    >> Can someone help me for this?
    >>
    >> --
    >> Regards,
    >> Dhana
    >>
    >>
    >>

    >
    >
     
    Sosh, Dec 31, 2005
    #4
    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. Earl Teigrob
    Replies:
    2
    Views:
    503
    Earl Teigrob
    Apr 29, 2004
  2. Giuseppe Dini

    maxlenght of a usercontrol

    Giuseppe Dini, Mar 12, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    354
    Patrice
    Mar 13, 2006
  3. Gnarlodious
    Replies:
    4
    Views:
    17,640
    elizas
    May 5, 2010
  4. tom c
    Replies:
    0
    Views:
    578
    tom c
    Sep 26, 2006
  5. Replies:
    1
    Views:
    580
    Eliyahu Goldin
    Nov 13, 2007
Loading...

Share This Page