Hi again Bozhidar:
I'm only looking to move items from one listbox to another. However, I'm simply not getting this. I'm not understanding why I need a deletecommand in my first listbox?? Listbox 1 is pulling from a reference table, so why would I delete from that? Perhaps I'm not getting this control at all, but I'm frustrated at this point as I'm already behind in my project plan due to this. Here's my code again. Please let me know what I'm doing wrong.
<
asp:SqlDataSource
ID
=
"paslead_DS"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:myconnection %>"
SelectCommand="SELECT DISTINCT up.id AS contactID, up.FirstName + ' ' + up.LastName + ' (' + groups.short_name + ')' AS paslead, '' AS areaID FROM User_Profile up INNER JOIN groups ON up.groupID = groups.id
WHERE (up.blnRemoved IS NULL OR up.blnRemoved = 0)
AND up.paslead_flag = 1
ORDER BY paslead">
</
asp:SqlDataSource
>
<
asp:SqlDataSource
ID
=
"pasleadSelected_DS"
runat
=
"server"
ConnectionString="<%$ ConnectionStrings:myconnection %>"
SelectCommand="SELECT up.id AS contactID, up.FirstName + ' ' + up.LastName + ' (' + groups.short_name + ')' AS paslead, acm.areaID
FROM User_Profile up,
groups,
area_contact_map acm
WHERE up.groupID = groups.id
and up.id = acm.userID
and acm.areaID = @id
and (acm.blnRemoved IS NULL OR acm.blnRemoved = 0)
and (up.blnRemoved IS NULL OR up.blnRemoved = 0)
ORDER BY paslead"
DeleteCommand="UPDATE area_contact_map SET update_date = getDate(), update_user = @u, blnRemoved = 1 WHERE areaID = @aid AND userID = @contactID"
InsertCommand="INSERT INTO area_contact_map (areaID, userID, create_date, create_user, blnRemoved) VALUES (@aid, @contactID, getDate(), @u, 0)">
<
SelectParameters
>
<
asp:Parameter
Name
=
"id"
Type
=
"String"
/>
</
SelectParameters
>
<
DeleteParameters
>
<
asp:Parameter
Name
=
"aid"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"userID"
/>
<
asp:Parameter
Name
=
"u"
Type
=
"String"
/>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"aid"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"contactID"
/>
<
asp:Parameter
Name
=
"u"
Type
=
"String"
/>
</
InsertParameters
>
</
asp:SqlDataSource
>