Friday, 24 August 2012

Beginning .Net : Text wrapping into the multi line textbox in asp.net

There are situation in multi line textbox where you want to wrapping text in textbox and sometimes you not want to wrap text , that text type as it is.
We can achieve this using "Wrap" property. By Default it is true.

In textbox Wrapping means if you entered text more than width of the textbox it will automatically set cursor into next line. In unwrapping if you entered text more than width of the textbox there is one horizontal scrollbar appear below the textbox and your line is continued.

Here is example for this.
In this example you can see that we take two text boxes one is "Product Description" and Second is "Product Meta Description". And both this text boxes are multiline textbox.
In "Product Description" textbox we allow warp text in this textbox.
And in "Product Meta Description" textbox we do not allow wraping in text.

You can see in output that in "Product Description" textbox new line created without pressing enter or return key. In "Product Meta Description" textbox scrollbar is appear when entered more data.

ASPX Code :
        <table>
            <tr>
                <td>
                    Product Description :
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtProductDescription" TextMode="MultiLine" Wrap="true"
                        Height="120px" Width="250px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Product Meta Description :
                </td>
                <td>
                    <asp:TextBox runat="server" ID="txtProductMetaDescription" TextMode="MultiLine" Wrap="false"
                        Height="120px" Width="250px"></asp:TextBox>
                </td>
            </tr>
        </table>

Output : 
(To view original image , click on image)

Here is example for set Maximum characters length of multi line textbox. Click Here...
 
For Beginning .Net articles. Click Here...
 
Here is very useful .Net Tips.


Note : Give Us your valuable feedback in comments. Give your suggestions in this article so we can update our articles accordingly that.


39 comments:

  1. This is an amazing blog,it gives very helpful messages to us.Besides that Wisen has established as Best Dot Net Training in Chennai. or learn thru ASP.NET Online Training . Nowadays Dot Net has tons of job opportunities on various vertical industry.

    ReplyDelete
  2. Great and impressive article!! Got to learn and know more about web development. To know more refer create website for much more unique ideas.PHP Training in Chennai | Best PHP training in Chennai

    ReplyDelete
  3. Nice article to read.Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
    selenium training in chennai

    ReplyDelete
  4. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
    uipath training in bangalore

    ReplyDelete
  5. This blog gives very important info about .Net Thanks for sharing
    Dot Net Online Training Hyderabad

    ReplyDelete
  6. The knowledge of technology you have been sharing thorough this post is very much helpful to develop new idea. here by i also want to share this.

    ccna training in chennai



    ccna training in bangalore


    ccna training in pune

    ReplyDelete
  7. I simply wanted to thank you so much again. I am not sure the things that I might have gone through without the type of hints revealed by you regarding that situation.
    fire and safety course in chennai

    ReplyDelete
  8. These tips are really helpful. Thanks a lot.Keep it up.Keep blogging.!!
    Digital Marketing courses in Bangalore

    ReplyDelete
  9. Thanks first of all for the useful info.
    the idea in this article is quite different and innovative please update more.
    vmware Training in Nungambakkam
    vmware Training in Vadapalani
    vmware Training in Mogappair
    vmware Training in Thirumangalam

    ReplyDelete
  10. This is really too useful and have more ideas and keep sharing many techniques. Eagerly waiting for your new blog keep doing more.
    Aws Training in Bangalore
    Aws Course in Bangalore
    Best Aws Training in Bangalore
    hadoop classes in bangalore
    hadoop institute in bangalore

    ReplyDelete
  11. Such an excellent and interesting blog, Do post like this more with more information, This was very useful, Thank you.
    Aviation Academy in Chennai
    Aviation Courses in Chennai
    best aviation academy in chennai
    aviation institute in chennai

    ReplyDelete
  12. I have gone through your blog, it was very much useful for me and because of your blog, and also I gained much unknown information, the way you have clearly explained is really fantastic. Kindly post more like this, Thank You.
    airport ground staff training courses in chennai
    airport ground staff training in chennai
    ground staff training in chennai

    ReplyDelete
  13. I just needed to record a speedy word to express profound gratitude to you for those magnificent tips and clues you are appearing on this site.
    iosh course in chennai

    ReplyDelete
  14. Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
    SEO company in coimbatore
    SEO Service in Coimbatore
    web design company in coimbatore

    ReplyDelete
  15. Thank you for sharing such great information very useful to us.
    CCNA Training in Gurgaon

    ReplyDelete
  16. Thanks for sharing your informative post on development.Your work is very good and I appreciate you and hoping for some more informative posts.keep writing
    and sharing.
    R Programming Training in Chennai

    ReplyDelete
  17. Amazing article. Your blog helped me to improve myself in many ways thanks for sharing this kind of wonderful informative blogs in live. I have bookmarked more article from this website. Such a nice blog you are providing ! Kindly Visit Us @ Best Travels in Madurai | Tours and Travels in Madurai | Madurai Travels

    ReplyDelete
  18. If more people that write articles really concerned themselves with writing great content like you, more readers would be interested in their writings. Thank you for caring about your content.
    Webdesign

    ReplyDelete
  19. It has been simply incredibly generous with you to provide openly what exactly many individuals wouldíve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.
    CCNA Training | ccna training in chennai |
    ccna certification in chennai | ccna course in chennai |best ccna training institute in chennai

    ReplyDelete