473,387 Members | 1,864 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,387 software developers and data experts.

how to assign default words to text box using c#

I am working on a project in visual studio usingc# and I am trying to assign some default word to a text box. I am really having a hard time. Do I have to use strings or is it in the text box properties?
Sep 17 '06 #1
1 14507
I am working on a project in visual studio usingc# and I am trying to assign some default word to a text box. I am really having a hard time. Do I have to use strings or is it in the text box properties?


To assign default value in the textbox control in c# do the following.
I assume that you have a textbox control named "MyTextBox" and the default text is "MyDefaultText" then the code will be:-

MyTextBox.Text="MyDefaultText";
Sep 18 '06 #2

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

Similar topics

0
by: yalanue | last post by:
I want to create a combobox with its displaymember populated from a datatable. But once I get it run, the default display member in the combobox is always the first row of the displaymember list....
1
by: anilbhu | last post by:
Hi, Is it possible to set default home page using java technology. By using this.setHomePage() of javascript we can achieve this but, it works only for IE and not for any other browser. Can...
0
by: johnlim20088 | last post by:
Hi, I just want the explanation of assign default logon credentials when we http web request in our code WHY some computer can without it? WHY some need it?
1
by: Bishman | last post by:
Hi, I have been trying to get text to scroll smoothly accross a windows form using GDI+ and a timer. Changing the position of the text by a configurable amount and calling invalidate to force a...
2
by: =?Utf-8?B?RHIuIFNldmVuY2Fu?= | last post by:
how can i assign an alternate text to a button like we do to html pictures with ALT? i am working under c# environment. thanx in advance -Dr. S.
3
by: nskclr | last post by:
Hi I add a text using document.selection.createRange(). I want to add a text to the bottom of another text - similar to what we do in HTML. <p> xyz </p> <p><div...
1
by: anilraja | last post by:
how to search within text using vbscript?
3
by: f6600840 | last post by:
Hi, What function I should use if I want to clean text using perl. Example. Input for my perl based shell command is SMI-1234 566.5.2.3.4.5.5.192.168.1.1 = "huuhaa" : SMI-1234...
4
by: research_stuff | last post by:
I have researched unhiding text using Javascript. I found examples unhiding text boxes. I need to unhide text when a radio button has been selected. Can someone point me to an example? ...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.