Click here to Skip to main content
15,911,646 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Error while executing .aspx in web browser Pin
Ravi Mori27-Mar-09 20:24
Ravi Mori27-Mar-09 20:24 
QuestionConnect to database between postback [modified] Pin
Civic0627-Mar-09 14:12
Civic0627-Mar-09 14:12 
AnswerRe: Connect to database between postback Pin
tech60327-Mar-09 19:10
tech60327-Mar-09 19:10 
GeneralRe: Connect to database between postback Pin
Civic0628-Mar-09 3:37
Civic0628-Mar-09 3:37 
Questionwhats do i need to do and how do i do it?? Pin
learningman27-Mar-09 10:51
learningman27-Mar-09 10:51 
AnswerRe: whats do i need to do and how do i do it?? Pin
Yusuf27-Mar-09 13:22
Yusuf27-Mar-09 13:22 
AnswerRe: whats do i need to do and how do i do it?? Pin
Colin Angus Mackay27-Mar-09 13:43
Colin Angus Mackay27-Mar-09 13:43 
QuestionThe source ListBox lost its item selections when a target ListBox item selection is cleared Pin
Tomz_KV27-Mar-09 10:49
Tomz_KV27-Mar-09 10:49 
I have three ListBox on a page. Select a few items from ListBox1 and then click a button, the selected items are added to ListBox2 and ListBox3. Here is the interesting behavior I observed. See the code below. After the first loop, items are added to ListBox2. I de-select the added items in ListBox2 (ListBox2.SelectedIndex=-1). This statement not only de-select items in ListBox2 but also causes the loss of selections in ListBox1. As a result, the second loop does not add anything to ListBox3. If this statement is commented out, the second loop add all selected items from ListBox1 to ListBox3. Does anyone know why this is happening? Is this a designed behavior? How to workaround this? Thanks,

foreach(ListItem itm in ListBox1.Items)
{
if (itm.Selected)
{
ListBox2.Items.Add(itm);
}
}

ListBox2.SelectedIndex = -1; //This line makes difference

foreach (ListItem itm in ListBox1.Items)
{
if (itm.Selected)
{
ListBox3.Items.Add(itm);
}
}

TOMZ_KV

AnswerRe: The source ListBox lost its item selections when a target ListBox item selection is cleared Pin
Ravi Mori27-Mar-09 19:54
Ravi Mori27-Mar-09 19:54 
GeneralRe: The source ListBox lost its item selections when a target ListBox item selection is cleared Pin
Tomz_KV28-Mar-09 3:23
Tomz_KV28-Mar-09 3:23 
AnswerRe: The source ListBox lost its item selections when a target ListBox item selection is cleared Pin
Tomz_KV30-Mar-09 4:14
Tomz_KV30-Mar-09 4:14 
QuestionVisual Studio 2008 with crystal reports 11.5 Pin
Battlehammer27-Mar-09 9:10
Battlehammer27-Mar-09 9:10 
AnswerRe: Visual Studio 2008 with crystal reports 11.5 Pin
Battlehammer7-Apr-09 5:09
Battlehammer7-Apr-09 5:09 
QuestionManiupulating information from a dataset to save it into an array ???? [modified] Pin
lued27-Mar-09 8:28
lued27-Mar-09 8:28 
AnswerRe: Maniupulating information from a dataset to save it into an array ???? Pin
Jörgen Andersson27-Mar-09 11:39
professionalJörgen Andersson27-Mar-09 11:39 
AnswerRe: Maniupulating information from a dataset to save it into an array ???? Pin
a.hamidy27-Mar-09 20:50
a.hamidy27-Mar-09 20:50 
QuestionHighlight and Select Row (clicking anywhere on it) Pin
alvarog0127-Mar-09 7:18
alvarog0127-Mar-09 7:18 
AnswerRe: Highlight and Select Row (clicking anywhere on it) Pin
Jörgen Andersson27-Mar-09 11:28
professionalJörgen Andersson27-Mar-09 11:28 
GeneralRe: Highlight and Select Row (clicking anywhere on it) Pin
alvarog0127-Mar-09 11:36
alvarog0127-Mar-09 11:36 
QuestionComplete ASP.NET Website Template with Security/Roles/Membership etc. Pin
Jasmine Pomelo27-Mar-09 7:00
Jasmine Pomelo27-Mar-09 7:00 
AnswerMicrosoft Website Templates Pin
David Mujica27-Mar-09 7:43
David Mujica27-Mar-09 7:43 
QuestionAjax based web application breaks on html tag in text field Pin
meenakumar27-Mar-09 6:01
meenakumar27-Mar-09 6:01 
AnswerRe: Ajax based web application breaks on html tag in text field Pin
Yusuf27-Mar-09 6:11
Yusuf27-Mar-09 6:11 
QuestionAccessing dropdownlist in footer of gridview from javascript Pin
nainakarri27-Mar-09 5:57
nainakarri27-Mar-09 5:57 
AnswerRe: Accessing dropdownlist in footer of gridview from javascript Pin
Ibrahim Bello27-Mar-09 6:50
Ibrahim Bello27-Mar-09 6:50 

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.