Click here to Skip to main content
15,923,910 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Can i add the database item to drop down list Pin
Anand Desai4-Aug-08 0:47
Anand Desai4-Aug-08 0:47 
AnswerRe: Can i add the database item to drop down list Pin
chandralekha4-Aug-08 1:53
chandralekha4-Aug-08 1:53 
Question(i m in big prob and need help) How to Assign Some text in a text box in Detail view Pin
Member 46590013-Aug-08 21:47
Member 46590013-Aug-08 21:47 
AnswerRe: (i m in big prob and need help) How to Assign Some text in a text box in Detail view Pin
Imran Khan Pathan3-Aug-08 23:17
Imran Khan Pathan3-Aug-08 23:17 
QuestionProblem with UpdatePanel And ListBox as Select ListBox Pin
Bardia Shahini3-Aug-08 21:37
Bardia Shahini3-Aug-08 21:37 
AnswerRe: Problem with UpdatePanel And ListBox as Select ListBox Pin
eyeseetee3-Aug-08 21:42
eyeseetee3-Aug-08 21:42 
AnswerRe: Problem with UpdatePanel And ListBox as Select ListBox Pin
Abhijit Jana3-Aug-08 21:48
professionalAbhijit Jana3-Aug-08 21:48 
QuestionRe: Problem with UpdatePanel And ListBox as Select ListBox Pin
Bardia Shahini4-Aug-08 20:24
Bardia Shahini4-Aug-08 20:24 
Thanks for reply,

I've used 4 buttons for transferring items from one side to the other side

MoveAll
MoveSelected
RetrunAll
ReturnSelected

and I've used a single Updatepanel.

this is my aspx code:
<updatepanel id="UpdatePanel1" runat="server" rendermode="Inline" updatemode="Conditional">
<contenttemplate>

<asp:listbox id="lstSource" runat="server" xmlns:asp="#unknown">

<asp:button id="btnMoveAll" runat="server" text=">>" onclick="btnMoveAll_Click" xmlns:asp="#unknown">


<asp:button id="btnMoveSeleted" runat="server" text=">" onclick="btnMoveSeleted_Click" xmlns:asp="#unknown">


<asp:button id="btnRemoveSelected" runat="server" text="<" onclick="btnRemoveSelected_Click" xmlns:asp="#unknown">


<asp:button id="btnRemoveAll" runat="server" text="<<" onclick="btnRemoveAll_Click" xmlns:asp="#unknown">
<asp:listbox id="lstDestination" runat="server" xmlns:asp="#unknown">



<triggers> <asp:asyncpostbacktrigger controlid="btnMoveSeleted" eventname="Click" xmlns:asp="#unknown">
<asp:asyncpostbacktrigger controlid="btnMoveAll" eventname="Click" xmlns:asp="#unknown">
<asp:asyncpostbacktrigger controlid="btnRemoveAll" eventname="Click" xmlns:asp="#unknown">
<asp:asyncpostbacktrigger controlid="btnRemoveSelected" eventname="Click" xmlns:asp="#unknown">
and this is my CodeBehind Code:

protected void btnMoveAll_Click(object sender, EventArgs e)
{
if (lstSource.Items.Count > 0)
{
int count = lstSource.Items.Count;
for (int i=0; i < count; i++)
{
lstDestination.Items.Add(lstSource.Items[i]);
}
lstSource.Items.Clear();
}

UpdatePanel1.Update();
}

protected void btnMoveSeleted_Click(object sender, EventArgs e)
{

if (lstSource.Items.Count > 0 && lstSource.SelectedValue != string.Empty)
{
lstDestination.Items.Add(lstSource.SelectedItem);
lstSource.Items.Remove(lstSource.SelectedItem);

}

UpdatePanel1.Update();

}

protected void btnRemoveSelected_Click(object sender, EventArgs e)
{
if (lstDestination.Items.Count > 0 && lstDestination.SelectedValue != string.Empty)
{
lstSource.Items.Add(lstDestination.SelectedItem);
lstDestination.Items.Remove(lstDestination.SelectedItem);
//SetListBoxIndexes();
}

UpdatePanel1.Update();

}

protected void btnRemoveAll_Click(object sender, EventArgs e)
{
if (lstDestination.Items.Count > 0)
{
int count = lstDestination.Items.Count;
for (int i=0; i < count; i++)
{
lstSource.Items.Add(lstDestination.Items[i]);
}
lstDestination.Items.Clear();

}

UpdatePanel1.Update();
}



regards,
Bardia
QuestionServer site problem Pin
krishnaveer3-Aug-08 21:28
krishnaveer3-Aug-08 21:28 
QuestionRe: Server site problem Pin
Abhijit Jana3-Aug-08 21:32
professionalAbhijit Jana3-Aug-08 21:32 
AnswerRe: Server site problem Pin
krishnaveer3-Aug-08 21:45
krishnaveer3-Aug-08 21:45 
AnswerRe: Server site problem Pin
Abhijit Jana3-Aug-08 22:50
professionalAbhijit Jana3-Aug-08 22:50 
GeneralRe: Server site problem Pin
krishnaveer4-Aug-08 2:33
krishnaveer4-Aug-08 2:33 
AnswerRe: Server site problem Pin
eyeseetee3-Aug-08 21:40
eyeseetee3-Aug-08 21:40 
GeneralRe: Server site problem Pin
krishnaveer3-Aug-08 21:48
krishnaveer3-Aug-08 21:48 
Questionhow to apply security Pin
gaurav mangal3-Aug-08 20:59
gaurav mangal3-Aug-08 20:59 
AnswerRe: how to apply security Pin
Abhijit Jana3-Aug-08 21:18
professionalAbhijit Jana3-Aug-08 21:18 
Questionbutton control and resource file [modified] Pin
farabba3-Aug-08 20:37
farabba3-Aug-08 20:37 
AnswerRe: button control and resource file Pin
eyeseetee3-Aug-08 21:44
eyeseetee3-Aug-08 21:44 
GeneralRe: button control and resource file Pin
farabba3-Aug-08 22:20
farabba3-Aug-08 22:20 
QuestionViewStateMac Problem Pin
Matt Cavanagh3-Aug-08 20:29
Matt Cavanagh3-Aug-08 20:29 
Questionhighlight certain keywords :( Pin
Anudeep Jaiswal3-Aug-08 20:24
Anudeep Jaiswal3-Aug-08 20:24 
AnswerRe: highlight certain keywords :( Pin
Imran Khan Pathan3-Aug-08 20:42
Imran Khan Pathan3-Aug-08 20:42 
AnswerRe: highlight certain keywords :( Pin
Sandeep Akhare3-Aug-08 21:34
Sandeep Akhare3-Aug-08 21:34 
QuestionHow to get orginal HTML source in axWebBrowser Pin
Barış Eskikaya3-Aug-08 20:20
Barış Eskikaya3-Aug-08 20:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.