473,378 Members | 1,544 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Finding out if TextArea is null

Expand|Select|Wrap|Line Numbers
  1. <textarea id="TextAreaSend" runat="server" name="SendText">
I have textarea that i want to understand whether it is null or not.
Expand|Select|Wrap|Line Numbers
  1.  if (TextAreaSend.InnerText != null)
  2.                 {
  3.                     TextAreaSend.InnerText = ticket1.Answer.AnswerText;
  4.                 }
  5.                 else {
  6.  
  7.                     TextAreaSend.InnerText = "Not answered yet";
  8.                 }
However it TextAreaSend.InnerText is never null for some reason.Do you know why its happening how can i find out if this text area is empty?
Dec 15 '14 #1

✓ answered by taylankaan

!String.IsNullOrEmpty(TextAreaSend.InnerText)
I should have used it.Not null is always true..

1 1238
!String.IsNullOrEmpty(TextAreaSend.InnerText)
I should have used it.Not null is always true..
Dec 15 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ike | last post by:
How can I make a textarea appear or disappear at the click of a button or link? Thanks, Ike
4
by: J. VerSchave | last post by:
I am curious if there is a way to handle this... maybe with Javascript... Is there a way to set a TEXTAREA field so that the tab key on the user's keyboard will create a tab within the text...
8
by: yerk5 | last post by:
Does js have some way of doing what I want here: I want to paste a multiline block of text into a TEXTAREA form field, and there is data in the block of text that I want to extract into a...
3
by: arashamiri | last post by:
Hi, I wrote an auto resizing textarea: function myMax(anumber, another) { if (anumber > another) { return anumber; } return another; }
2
by: Michael | last post by:
Question 1 ---------------- I am writing an advanced BBCode system for my forums and I would like to be able to find where the cursor was positioned last in the text so I could insert the BBCode...
3
by: FunkHouse9 | last post by:
I'm working on a form to collect data in a textarea which and am trying to keep returns and spaces. I have a couple of functions that I Frankensteined together to replace returns with <br> and to...
2
by: thuythu | last post by:
Please help me.... I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the...
3
by: saytri | last post by:
I am displaying the contents of a textfile in a textArea. I want that when i edit this text in the textArea it is automatically saved in the textfile. I have wriitten this code, but the problem is...
5
by: David Morris | last post by:
I keep getting this syntax error in one of my webpages and I have looked through it and I can't find it. Its not my includes because they work fine on my other pages. Please Help! Parse error:...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.