hi,
i have two listboxes for my matrimonial website
listbox for "star"
first listbox is lstleftstar
and
second listbox is lstrightstar
i used javascript & jquery for two listbox moving items on mouse doubleclick event
but when i click on submit button for insert the items from lstleftstar to lstrightstar
then that time
nothing is work..
listbox items shows counting "0" items.
i disabled ajax but not work..
my coding is
please just check this code and i copy my main coding here of only listbox and i have doubted..
*********************************
<script type="text/javascript"> /* star */
function lst_left_star_DblClicked() {
var left_lst = document.getElementById("<%=lst_leftstar.ClientID%>");
var right_lst = document.getElementById("<%=lst_rightstar.ClientID%>");
for (var i = 0; i < left_lst.length; i++) {
if (left_lst.options[i].selected == true) {
right_lst.options[right_lst.length] =
new Option(left_lst.options[i].text,
left_lst.options[i].value);
left_lst.options[i] = null;
i = i - 1;
}
}
return;
}
function OnRequestStart(target, arguments) {
if (arguments.get_eventTarget().indexOf("Button1") > -1) {
arguments.set_enableAjax(false);
}
}
</script>
**************************************************
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Width="100%" ClientEvents-OnRequestStart="OnRequestStart">
<table>
<tr>
<td class="table_register2_td_left">
Star
</td>
<td>
<asp:ListBox ID="lst_leftstar" onDblClick="lst_left_star_DblClicked();" runat="server"
Height="100px" Width="180px"></asp:ListBox>
<div style="margin-bottom: 0px; display: inline; position: relative; top: -35px;">
<img src="images/lr-arrow.gif" alt="" /></div>
<asp:ListBox ID="lst_rightstar" onDblClick="lst_right_star_DblClicked();" runat="server"
Height="100px" Width="180px"></asp:ListBox>
</td>
</tr>
</table>
***********************************************
coding is aspx.cs
===================
problem is here that cant entered in for loop.
Cls_RegisterInfo clsregisterinfo = new Cls_RegisterInfo();
protected void Button1_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
dt.Columns.Add("Star_Id");
for (int i = 0; i < lst_rightstar.Items.Count; i++)
{
dt.Rows.Add("");
dt.Rows[i]["Star_Id"] = lst_rightstar.Items[i].Value;
}
clsregisterinfo.Dtstd = dt; pass items in class file clsregisterinfo
clsregisterinfo.insert_profile_star(); its a class file method insert_profile_star();
}
==> how to do ??