Academic Tutorials



English | French | Portugese | Dutch | Italian
Google

on-line

Haupt Quellenprogramme E-Bücher Downloads Mit uns in Verbindung treten Über uns

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


ASP.NET - Der ArrayList Gegenstand
Previous Next




Eine Ansammlung Einzelteile, die einen einzelnen Datenwert enthalten, wird den ArrayList Gegenstand genannt.




Ein ArrayList verursachen

Eine Ansammlung Einzelteile, die einen einzelnen Datenwert enthalten, wird den ArrayList Gegenstand genannt.

Mit der Methode hinzufügen () werden Einzelteile dem ArrayList hinzugefügt.

Der Code folgend verursacht einen neuen ArrayList Gegenstand, der mycountries genannt wird und vier Einzelteile werden addiert:

<script runat="server">
Sub Page_Load
if Not Page.IsPostBack then
dim mycountries=New ArrayList
mycountries.Add("Norway")
mycountries.Add("Sweden")
mycountries.Add("France")
mycountries.Add("Italy")
end if
end sub
</script>


Durch Rückstellung enthält ein ArrayList Gegenstand 16 Eintragungen und ein ArrayList kann zu seiner abschließenden Größe mit der TrimToSize () Methode sortiert werden:
<script runat="server">
Sub Page_Load
if Not Page.IsPostBack then
dim mycountries=New ArrayList
mycountries.Add("Norway")
mycountries.Add("Sweden")
mycountries.Add("France")
mycountries.Add("Italy")
mycountries.TrimToSize()
end if
end sub
</script>

Ein ArrayList kann mit der Methode der Art auch numerisch oder alphabetisch sortiert werden ():

<script runat="server">
Sub Page_Load
if Not Page.IsPostBack then
dim mycountries=New ArrayList
mycountries.Add("Norway")
mycountries.Add("Sweden")
mycountries.Add("France")
mycountries.Add("Italy")
mycountries.TrimToSize()
mycountries.Sort()
end if
end sub
</script>

Die Rück () Methode nach der Methode der Art () an der Art im Rückauftrag anwenden,

<script runat="server">
Sub Page_Load
if Not Page.IsPostBack then
dim mycountries=New ArrayList
mycountries.Add("Norway")
mycountries.Add("Sweden")
mycountries.Add("France")
mycountries.Add("Italy")
mycountries.TrimToSize()
mycountries.Sort()
mycountries.Reverse() end if
end sub
</script>



Daten, die an ein ArrayList binden

Ein ArrayList Gegenstand kann die Werte und den Text zu den folgenden Kontrollen automatisch erzeugen:

  • Asp: RadioButtonList
  • Asp: DropDownList
  • Asp: CheckBoxList
  • Asp: Listbox

Eine RadioButtonList Steuerung zuerst verursachen (ohne irgendein Asp: ListItem Elemente) in einer .aspx Seite, zum von Daten an eine RadioButtonList Steuerung zu binden:

<html>
<body>
<form runat="server">
<asp:RadioButtonList id="rb" runat="server" />
</form>
</body>
</html>
Den Index dann addieren, der die Werte bindet und die Liste in der Liste zur RadioButtonList Steuerung errichtet:
<script runat="server">
Sub Page_Load
if Not Page.IsPostBack then
dim mycountries=New ArrayList
mycountries.Add("Norway")
mycountries.Add("Sweden")
mycountries.Add("France")
mycountries.Add("Italy")
mycountries.TrimToSize()
mycountries.Sort()
rb.DataSource=mycountries
rb.DataBind()
end if
end sub
</script>
<html>
<body>
<form runat="server">
<asp:RadioButtonList id="rb" runat="server" />
</form>
</body>
</html>

Die DataSource Eigenschaft der RadioButtonList Steuerung wird benutzt, um auf das ArrayList einzustellen und sie definiert die Datenquelle der RadioButtonList Steuerung und die DataBind () Methode der RadioButtonList Steuerung bindet die Datenquelle mit der RadioButtonList Steuerung.

Anmerkung: Die Datenwerte werden als der Text verwendet und Werteigenschaften zur Steuerung und zu Mehrwerte, die zu dem Text unterschiedlich sind, benutzen entweder den Hacktischgegenstand oder den SortedList Gegenstand.





Previous Next

Schlüsselwörter: ASP.NET, die das ArrayList verwenden, wenden, vb Nettoarraylist, Asp Nettoarraylist, grundlegendes sichtlicharraylist, vb Nettoc$verwenden, Asp Nettogegenstand, vb Nettogegenstand, grundlegender sichtlichgegenstand, grundlegendes sichtlichc$verwenden, Asp Nettoc$verwenden, Java arraylist, c# arraylist, arraylist Art, arraylist Beispiel, c# mit, arraylist API, arraylist Methoden, das arraylist ein, das, arraylist Zeichenkette, Java Gegenstand, jsp arraylist, arraylist Ansammlung, arraylist Methode, vb arraylist, arraylist Vektor, arraylist Erbauer, das arraylist intern ist, das serializable ist, das tostring arraylist, arraylist hinzufügen, arraylist erhalten, c# Gegenstand, arraylist Art, arraylist Spreizen, statisches arraylist


HTML Quizes
HTML Quiz
XHTML Quiz
CSS Quiz
TCP/IP Quiz
XML Quizes
XML Quiz
XSL Quiz
XSLT Quiz
DTD Quiz
Schema Quiz
XForms Quiz
XSL-FO Quiz
XML DOM Quiz
XLink Quiz
XQuery Quiz
XPath Quiz
XPointer Quiz
RDF Quiz
SOAP Quiz
WSDL Quiz
RSS Quiz
WAP Quiz
Web Services Quiz
Browser Scripting Quizes
JavaScript Quiz
VBScript Quiz
AJAX Quiz
DHTML Quiz
HTML DOM Quiz
WMLScript Quiz
E4X Quiz
Server Scripting Quizes
ASP Quiz
PHP Quiz
PERL Quiz
SQL Quiz
ADO Quiz
.NET (dotnet) Quizes
Microsoft.Net Quiz
XML Web Services Quiz
ASP.Net Quiz
.Net Mobile Quiz
C# : C Sharp Quiz
ADO.NET Quiz
VB.NET Quiz
Multimedia Quizes
SVG Quiz
Flash Quiz
Media Quiz
SMIL Quiz
Web Building  Quizes
Web Browsers Quiz
Web Hosting Quiz
W3C Quiz
Web Building Quiz
Web Quality Quiz
Web Semantic Quiz
Web Careers Quiz
Java Quizes
Java Quiz
JSP Quiz
Servlets Quiz
Struts Quiz
EJB Quiz
JMS Quiz
JMX Quiz
Programming Langauges Quizes
C Quiz
C++ Quiz
Visual Basic Quiz
Data Structures Using C Quiz
Soft Skills Quizes
Communication Skills Quiz
Time Management Quiz
Project Management Quiz
Team Work Quiz
Leadership Skills Quiz
Corporate Communication Quiz
Negotiation Skills Quiz

Privacy Policy
Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.