Kategoriler


SON YORUMLAR
mehmet uluğ
bu makalemsi makale! şaka olmalı:)
sevda
beğendim
Reyting Amca
Sitenin reytingi düştü. Google.da aratınca arkalarda çıkıyor. Eskiden ilk sırada çıkardı. Site sahibi ateşli yazılar yazmıyor 1-2 yıldır...
Seda
web sitesi, masa üstü uygulamaları, muhasebe, restaurant, otel, barkot sistemleri yazılımı yapılır. adres:s.sedaerden@gmail.com
Hafize
Yazılım ödevleri ve web sitesi yapılır.Bilgi için hafizearduc@hotmail.com
Gamze
C#, C++, ASP.NET-MVC, HTML-CSS, Matlab, Arduino ödevleri yapılır. Bilgi için; gamze.zirh@gmail.com
Eyüp yılmaz
merve seni seviıyorum asl bebeyoö
BEYZADE BOZTEPE
18 Yaşındayım ınstagram=beyzadebztp
Eyüp yılmaz
39 yasındayım coderım hackerıım ıp verın modemınıze vurayım
BEYZADE BOZTEPE
18 Yaşındayım ınstagram=beyzadebztp (çıkın çıkın gelin GIZLARRRRR)
BEYZADE BOZTEPE
EYVALLAH BENDE İYİYİM
BEYZADE BOZTEPE
İYİYİM GEZEGEN SEN NASILSIN
Eyüp yılmmaz
17 yasındayım kız talıplerımı beklıyom ınsatgram= eyup.yılmaz3
BEYZADE BOZTEPE
MERHABA DÜNYA

Bilgisayar Mühendisleri
Here is the website inspired me to use 
it as a guide when I tried to define 
myself as an engineer candidate a few 
years ago. It really helped me to work
 and study feeling in confidence with 
being on the right way. I suggest this 
website to whom it may direct her/his 
to find the right career path. It 
includes many articles varies from 
real life experiences to detailed 
software engineering issues. But the 
most dignified parts for me are the 
articles in general and career titles.
Son okunan makaleler:
ASP .NET - The TextBox Control
ASP.NET - Event Handlers
Bir bakışta VB.net ve C# karşılaştırması
Kendini Geliştirmek Ne Demek?
ASP .NET - XML Files
ViewState Compression
ViewState’in Sunucuda Saklanması
Bir bilgisayar mühendisinin bilmesi gereken en temel teknolojiler
Web Servislerinde Parametre Girisinin Gosterilmesi
Asp.Net 2.0 ve Client Script Callback
ASP.NET Web Forms
ASP.NET Introduction: What is ASP
Ajax kullananlar için yükleniyor resimleri
ASP.NET - Database Connection
Ado.Net 2.0 - Connection Pooling' in Önemi
İşsizlik psikolojisi
Bilgisayar Mühendisleri Kaç Para Alır?
ASP.NET - The SortedList Object
Bilgisayar Mühendisi Ne İş yapar? Program Nedir? Çeşitli Sorular?
DataGrid ve GridView Kontrollerinde Görünmez Kolonlar

Bilgisayar Mühendisleri Portalı

ASP .NET - The TextBox Control

The TextBox Control

The TextBox control is used to create a text box where the user can input text.

The example below demonstrates some of the attributes you may use with the TextBox control:

 

<html>
<body>

<form runat="server">

A basic TextBox:
<asp:TextBox id="tb1" runat="server" />
<br /><br />

A password TextBox:
<asp:TextBox id="tb2" TextMode="password" runat="server" />
<br /><br />

A TextBox with text:
<asp:TextBox id="tb4" Text="Hello World!" runat="server" />
<br /><br />

A multiline TextBox:
<asp:TextBox id="tb3" TextMode="multiline" runat="server" />
<br /><br />

A TextBox with height:
<asp:TextBox id="tb6" rows="5" TextMode="multiline"
runat="server" />
<br /><br />

A TextBox with width:
<asp:TextBox id="tb5" columns="30" runat="server" />

</form>

</body>
</html>


Add a Script

The contents and settings of a TextBox control may be changed by server scripts when a form is submitted. A form can be submitted by clicking on a button or when a user changes the value in the TextBox control.

In the following example we declare one TextBox control, one Button control, and one Label control in an .aspx file. When the submit button is triggered, the submit subroutine is executed. The submit subroutine writes a text to the Label control:

<script runat="server">
Sub submit(sender As Object, e As EventArgs)
lbl1.Text="Your name is " & txt1.Text
End Sub
</script>
<html>
<body>
<form runat="server">
Enter your name:
<asp:TextBox id="txt1" runat="server" />
<asp:Button OnClick="submit" Text="Submit" runat="server" />
<p><asp:Label id="lbl1" runat="server" /></p>
</form>
</body>
</html>

 

In the following example we declare one TextBox control and one Label control in an .aspx file. When you change the value in the TextBox and either click outside the TextBox or press the Tab key, the change subroutine is executed. The submit subroutine writes a text to the Label control:

<script runat="server">
Sub change(sender As Object, e As EventArgs)
lbl1.Text="You changed text to " & txt1.Text
End Sub
</script>
<html>
<body>
<form runat="server">
Enter your name:
<asp:TextBox id="txt1" runat="server"
text="Hello World!"
ontextchanged="change" autopostback="true"/>
<p><asp:Label id="lbl1" runat="server" /></p>
</form>
</body>
</html>

 

Properties

Property Description
AutoPostBack A Boolean value that specifies whether the control is automatically posted back to the server when the contents change or not. Default is false
Columns The width of the textbox
id A unique id for the control
MaxLength The maximum number of characters allowed in the textbox
OnTextChanged The name of the function to be executed when the text in the textbox has changed
Rows The height of the textbox (only used if TextMode="Multiline")
runat Specifies that the control is a server control.  Must be set to "server"
Text The contents of the textbox
TextMode

SingleLine creates a text box with only one line. MultiLine creates a text box with multiple lines. Password creates a one-line text box that masks the value entered by the user. Default is SingleLine. Legal values are:

  • SingleLine
  • MultiLine
  • Password
Wrap A Boolean value that indicates whether the contents of the textbox should wrap or not

Bu makaleyi beğendin mi? Yorumunu Yaz!







Sizden Gelen Yorumlar:

Yorum Yazın




Copyright© 2001-2017. Bilgisayar Mühendisleri Portalı | Bütün hakları saklıdır.