c#


How do I check the contents of a TextBox?


I have a textbox. In that textbox I write Human. Then I click a button, and if the word is human, then on a richtextbox, the word human will appear.
Here's the code I've tried.
private void button3_Click(object sender, EventArgs e)
{
if (textBox4.Text)
{
richTextBox1.Text = "human";
}
}
private void textBox4_TextChanged(object sender, EventArgs e)
{
string value = textBox4.Text;
}
I tried making the textbox into a string so I could use it in the if statement, but it didn't work, so instead I used texbox4.text, but it is still wrong.
You could simply do with this piece of code,
private void button1_Click(object sender, EventArgs e)
{
if(textBox1.Text =="human")
{
richTextBox1.Text = textBox1.Text;
}
}

Related Links

Is there an easy way to check who has a reader lock or a writer lock in Visual Studio 2010?
Word - Add a bookmark between existing bookmarks or at end of document
passing cookie to my webbrowser
Loop through Request object keys
How to create an ie explorerbar bandobject that doesn't show up in the toolbar
How to transform an xml string using a XSLT in C#
I need help with this error please: Could not write to output file…file is being used by another process.
Http Response Object in new window
Why am I getting System.OutOfMemoryException?
Change display of DateTime in MVC
XML attribute to indicate overwrite vs. preserve existing value
EdmSchemaAttribute interrupt some pages and throws an exception
Setting a property hidden by control's interface
EF Code First 4.1: “Multiple Inheritence” (Is A) Question
TripleDESCryptoServiceProvider using hex key
Use SQL Server CE Locally and SQL Server 2008 on Production Entity Framework Code First?

Categories

HOME
excel-formula
msbuild
compression
abc
opencv4android
liquibase
mailchimp
virtualhost
sahi
ejb-3.0
dcos
oms
websharper
browsermob
cakephp-2.0
reportlab
alert
civicrm
draw2d
android-wifi
cherrypy
vala
fibonacci
mattermost
matlab-gui
inline-assembly
boosting
pushpad
xlib
schedule
postgresql-9.6
node-soap
rtos
webmock
ansible-inventory
hippocms
iterm2
instances
armadillo
delphi-xe
test-kitchen
codepen
logan-square
synchronized
npoco
spring-ide
pyopenssl
e4
riemann
playframework-1.x
jenkins-docker
toggleclass
mongodb-3.3
x12
hdr
boost-range
jira-agile
qtruby
airwatch
db2-zos
pebble-js
trendline
encode
dynamics-nav
pushwoosh
jsoncpp
euro
vspackage
opennebula
optimistic-locking
crtdbg.h
qxorm
api-eveonline
tigase
selenium-grid2
javacompiler
ant-contrib
lettuce
enquire.js
logo-lang
netbeans-plugins
facebook-likebox
google-oauth-java-client
dylan
kendo-window
cab
pyxplot
infinity.js
architectural-patterns
rbm
cryptarithmetic-puzzle
diazo
mvcmailer
sqlbuddy
visual-leak-detector
youtube.net-api
object-tag
response-time
javah
xslt-grouping
webdb
versions
hp-trim
time-management
atmega16
memory-consumption

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App