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

How to make ToString() method for a list of customs struct
Azure Service Bus Relay - Enabling Compression
Convert dataGridView to dataTable: error
Any design patterns for initialization? C#
How can i check/detect when i run a new exe process?
Using Serial Port communication in all WPF forms in an application
ObjectDisposedException unhandled called from BackgroundWorker
An efficient way to Base64 encode a byte array?
Best practice for editing MVC3 auto generated code?
Read special characters back from XmlDocument in c#
EndpointNotFoundException when calling a service
trying to int.parse multi array string
Dashed shapes drawing in unexpected scale
Make linq aware of uniqe ID
how to fetch wpf combobox selected value (key)
ASP.NET Membership Email Verification

Categories

HOME
qlikview
ckan
google-cloud-pubsub
azure-documentdb
alasql
pyspark
cluster-analysis
arcgis
query-string
esxi
autocad
sequence
install
open-search-server
virtualhost
activejdbc
adroitlogic
tracking
saucelabs
aggregate
console-application
exchange-transport-agents
game-engine
google-street-view
cherrypy
gnu-screen
email-client
aspxgridview
poisson
rancher
android-6.0-marshmallow
scripting-language
launchd
deferred
jmsserializerbundle
wordpress-rest-api
tikz
jcr
visual-prolog
scene7
restler
minitest
ponylang
campaign-monitor
rtsp
jquery-inputmask
latency
definition
paperclip
apiman
api-key
synchronized
ocamlbuild
togglebutton
easyquery
dcom
multi-select
iban
scanf
lattice
mavlink
scikit-image
cherry-pick
system-integration
3d-rendering
innertext
calc
ideavim
ooad
jsondoc
dday
jquery-draggable
cascading
libgcrypt
play-json
notice
p4python
euro
vectordrawable
stderr
httpmodule
maven-archetype
numerical-recipes
crystal-reports-7
yosemite
famous-engine
fscanf
ccmenuitem
nspopupbutton
behance-api
slimscroll
class-library
myrrix
fade
ojb
forward-declaration
mysql2
orchestration
report-viewer2010
google-email-audit-api
commonsware
joomla1.7
isgl3d
qvariant
norton
nscharacterset
jquery-attributes
appointment
high-load
urlscan

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