The AutoPostBack property indicates whether or not the control posts back to the server each time a user interacts with the control. This topic will walk you through creating a C1AutoComplete control, setting the content, and setting the AutoPostBack property.
Complete the following steps:
<cc1:C1AutoComplete> </cc1:C1AutoComplete>
tags. Insert the following markup between the tags to create your C1AutoCompleteDataItems.
To write code in Source View
<Items>
<cc1:C1AutoCompleteDataItem Label="c++" Value="c++" />
<cc1:C1AutoCompleteDataItem Label="java" Value="java" />
<cc1:C1AutoCompleteDataItem Label="php" Value="php" />
<cc1:C1AutoCompleteDataItem Label="coldfusion" Value="coldfusion"/>
<cc1:C1AutoCompleteDataItem Label="javascript" Value="javascript"/>
<cc1:C1AutoCompleteDataItem Label="asp" Value="asp" />
<cc1:C1AutoCompleteDataItem Label="ruby" Value="ruby" />
<cc1:C1AutoCompleteDataItem Label="python" Value="python" />
<cc1:C1AutoCompleteDataItem Label="c" Value="c" />
<cc1:C1AutoCompleteDataItem Label="scala" Value="scala" />
<cc1:C1AutoCompleteDataItem Label="groovy" Value="groovy" />
<cc1:C1AutoCompleteDataItem Label="haskell" Value="haskell" />
<cc1:C1AutoCompleteDataItem Label="perl" Value="perl" />
</Items>
<asp:ListBox></asp:ListBox>
tags and add the following markup to govern the width and height of the ListBox control:
To write code in Source View
Width="300px" Height="300px"
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Protected Sub C1AutoComplete1_ItemSelected(ByVal sender As Object, ByVal args As C1.Web.Wijmo.Controls.C1AutoComplete.C1AutoCompleteDataItemEventArgs) End Sub |
To write code in C#
C# |
Copy Code
|
---|---|
protected void C1AutoComplete1_ItemSelected(object sender, C1.Web.Wijmo.Controls.C1AutoComplete.C1AutoCompleteDataItemEventArgs args) |
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
ListBox1.Items.Add(New ListItem(C1AutoComplete1.Text)) |
To write code in C#
C# |
Copy Code
|
---|---|
ListBox1.Items.Add(new ListItem(C1AutoComplete1.Text)); |