Hi all,
How do you do to make your lisxbox control to display your multiple selection at the same time. when i make a single selection it displays the the result but when i do more than on selection it only grabs the result for the first selected field and ignore the second one. for example when i select both MN and WI I am only getting the out put for MN. I am working with Visual Studio 2005 and oracle 9i DB. thanks for the help
I did set the selection mode to Multiple but to no avail.
I appreciate it. Below is the Code.
How do you do to make your lisxbox control to display your multiple selection at the same time. when i make a single selection it displays the the result but when i do more than on selection it only grabs the result for the first selected field and ignore the second one. for example when i select both MN and WI I am only getting the out put for MN. I am working with Visual Studio 2005 and oracle 9i DB. thanks for the help
I did set the selection mode to Multiple but to no avail.
I appreciate it. Below is the Code.
Code:
%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ListBox ID="ListBox1" runat="server" DataSourceID="SqlDataSource1" DataTextField="CONTID"
DataValueField="CONTID" SelectionMode=Multiple></asp:ListBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT DISTINCT "CONTID" FROM "ADDEND"'>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ADDEND,CONTID"
DataSourceID="SqlDataSource2">
<Columns>
<asp:BoundField DataField="ADDEND" HeaderText="ADDEND" ReadOnly="True" SortExpression="ADDEND" />
<asp:BoundField DataField="CONTID" HeaderText="CONTID" ReadOnly="True" SortExpression="CONTID" />
<asp:BoundField DataField="DATEADD" HeaderText="DATEADD" SortExpression="DATEADD" />
<asp:BoundField DataField="ADESCR" HeaderText="ADESCR" SortExpression="ADESCR" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT DISTINCT "ADDEND", "CONTID", "DATEADD", "ADESCR" FROM "ADDEND" WHERE ("CONTID" = :CONTID)'>
<SelectParameters>
<asp:ControlParameter ControlID="ListBox1" Name="CONTID" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
</html>