Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Friends,

I am trying to implement TextArea in my Asp.Net Web Forms.

Demo - http://jsfiddle.net/W7Rmv/[^]

Please check this fiddle with Chrome or Mozilla.
When I am trying to implement same TextArea, it asking rows and cols in aspx page and it is not working in IE.

What I have to change to implement same TextArea in my Asp.Net WebPage.

Basically, I want the same type of behavior in IE, that is re-size icons in right bottom corner of TextArea and no Scollbars.

Thank you,
Sindhu.
Posted
v4

If you want the same TextArea in Asp.Net, then you can directly use that in the page.
Just add the HTML in aspx page, it will render as it is.

In case you want to access the control on Server Side (Code Behind), then add a runat="server" attribute to the TextArea like below.
HTML
<textarea runat="server" type="textarea" id="txtArea" placeholder="enter the message...">
</textarea>



[Update after discussion with OP]

Yes, as I checked, it is not working in IE.
This is because, the re-sizing is done by CSS resize property, which is not supported by IE.

Refer
1. Can I use CSS resize property?[^]
2. CSS3 resize Property[^]


There is a solution, Don't worry.

I researched and found out a workaround for it.

For removing scroll-bars, you have to write - style="overflow:hidden;".
To show re-size icons, you can try jQuery Resizable[^] plugin.

Demo

[Demo] jQuery TextArea Resizable[^]
Mark that it is working in IE as well.

You need jQuery and jQuery UI files for this.
 
Share this answer
 
v2
Comments
Naga Sindhura 18-Sep-13 6:14am    
Hi Tadit, thanks for your reply. the textarea showing browser compatibility issue with IE. When user trying to drag textarea using bottom right corner icon it showing in chrome and other browsers not in IE(it showing vertical scroll bar). what i have to add resolve browser compatibility issue with textarea?
Okay. Let me check it in IE. Hang on.
Naga Sindhura 18-Sep-13 6:28am    
thank you, and sure Tadit Dash
Yes, as I checked, it is not working in IE.
This is because, the re-sizing is done by css resize property, which is not supported by IE.

Refer -
1. Can I use CSS resize property?[^]
2. CSS3 resize Property[^]

There is a solution, Don't worry.

I researched and found out a workaround for it.

For removing scroll-bars, you have to write - style="overflow:hidden;".
To show re-size icons, you can try jQuery Resizable[^] plugin.

Demo - [Demo] jQuery TextArea Resizable[^]

Mark that it is working in IE also.

You need jQuery and jQuery UI files for this.
Did you check my reply?
use css like this
C#
#txtArea
{
   border-style:dashed;
    border-color:red;
    resize:none;

}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900