我正在使用下面的代码从文本框中获取所选文本,并使用自动填充扩展程序。如何从数据库中检索Items ID?有没有办法在下面的代码中添加一些东西来获取项目ID?谢谢
<script language="javascript" type="text/javascript">
function getSelected(source, eventArgs) {
document.getElementById('<%=DetailsTextBox.ClientID %>').value = eventArgs.get_value();
}
</script>
<asp:TextBox ID="TextBox1" runat="server" Height="24px" Width="486px"
AutoPostBack="True"></asp:TextBox>
<asp:AutoCompleteExtender ID="AutoCompleteExtender" runat="server"
DelimiterCharacters="" Enabled="True" ServicePath="AutoComplete.asmx"
ServiceMethod="GetCompletionList" TargetControlID="TextBox1"
MinimumPrefixLength="2" UseContextKey="true" ContextKey="StateDropDown"
CompletionListElementID="autocompleteDropDownPanel"
onclientitemselected="getSelected()">
</asp:AutoCompleteExtender>