Ask a Question related to ASP.NET General, Design and Development.
-
Chris Moore #1
RE: listbox
Could you provide some source code to give an example of your problem?
Chris Moore [msft]
Visual Studio Update
--------------------4.35.58.209>From: "jeff" <vader1000x@yahoo.com>
>Subject: listbox
>Date: Mon, 23 Jun 2003 15:10:19 -0400
>Lines: 9
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <u3ZlbubODHA.3408@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: washdc3-ar4-4-35-058-209.washdc3.dsl-verizon.net>Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
>Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154384
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>i have an unbound webforms listbox. when i add items and select something,
>selecteditem, selectedvalue are nothing. selectedindex is -1. if i us the
>exact same code with an unbound combobox, it returns a selected item.
>
>wassup wit dat? i'm using .net 1.1 w/vb.
>
>jeff
>
>
>Chris Moore Guest
-
xml to combobox, combobox to listbox, listbox todetails
i am going out of my mind looking for a tutorial i am able to use a xml document and the xml connector component to populate a pulldown menu, i... -
listbox to populate a listbox
I am trying to use a listbox that I have setup using flash remoting call to a db. What I want to happen is when you click on a item in first the... -
click listbox and refresh another listbox
Can someone guide me to a resource on building set of drill-down listboxes? Basically I want to have 4 listboxes. The first starts out with... -
Item label displays as "," when moving from listbox to listbox
I have 2 listboxes: "lb_unselected" and "lb_selected". The first thing in the actions is loop through an array populating these two listboxes. ... -
now desparate! - 1st listbox contents disappears when 2nd listbox appears?
On 23 Jun 2003 12:57:45 -0700, KathyBurke40@attbi.com (KathyB) wrote: Its been a while since you posted but I will answer anyway. The problem... -
jeff #2
Re: listbox
i found the problem after a lot of digging. for whatever reason, i had to
put my listbox.add("x") code inside of an if not ispostback.
jeff
"Chris Moore" <bork111@yahoo.com> wrote in message
news:ns0VW5MPDHA.1640@cpmsftngxa06.phx.gbl...microsoft.public.dotnet.framework.aspnet:154384> Could you provide some source code to give an example of your problem?
>
> Chris Moore [msft]
> Visual Studio Update
> --------------------> 4.35.58.209> >From: "jeff" <vader1000x@yahoo.com>
> >Subject: listbox
> >Date: Mon, 23 Jun 2003 15:10:19 -0400
> >Lines: 9
> >X-Priority: 3
> >X-MSMail-Priority: Normal
> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
> >Message-ID: <u3ZlbubODHA.3408@tk2msftngp13.phx.gbl>
> >Newsgroups: microsoft.public.dotnet.framework.aspnet
> >NNTP-Posting-Host: washdc3-ar4-4-35-058-209.washdc3.dsl-verizon.net> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
> >Xref: cpmsftngxa06.phx.gblsomething,> >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> >
> >i have an unbound webforms listbox. when i add items and selectthe> >selecteditem, selectedvalue are nothing. selectedindex is -1. if i us>> >exact same code with an unbound combobox, it returns a selected item.
> >
> >wassup wit dat? i'm using .net 1.1 w/vb.
> >
> >jeff
> >
> >
> >
jeff Guest
-
Kevin Spencer #3
Re: ListBox
I would recommend adding the items to the HttpContext. As you're using
Server.Transfer, you should be able to grab them back out of it in the
target page.
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Big things are made up of
lots of little things.
"Alberto" <aconti@stsci.edu> wrote in message
news:633f92d6.0307140914.40fa0441@posting.google.c om...news:<O0zCwhZSDHA.2256@TK2MSFTNGP11.phx.gbl>...> Hi Keven,
>
>
> doing this
>
> for (int i = 0; i < outputColumnsListBox.Items.Count; i++)
> {outputColumnsListBox.Items[i].Selected = true;}
>
> will indeed set the items to "selected", however I still cannot pass
> the selected items to a new asp.net page. Somehow the page does not
> know that all items have been selected.
>
> Alberto
>
>
> "Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in messageare> > A Listbox can only have ONE SelectedIndex. It can have many options that> > selected, though. Set the "selected" property of the list Items.
> >
> > --
> > HTH,
> >
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > [url]http://www.takempis.com[/url]
> > Big things are made up
> > of lots of little things
> >
> > "Alberto" <aconti@stsci.edu> wrote in message
> > news:633f92d6.0307131515.4dfe0a36@posting.google.c om...> > > Hi,
> > >
> > > I have an ASP.NET application with C# code behind that has a ListBox.
> > > The user is allowed to decide the order and the number of items in the
> > > list box. The items make up a list of output columns to be displayed
> > > in a new page.
> > > Once the user is satisfied, he/she will hit Submit and the values of
> > > *ALL* listbox items remaining have to be passed to a new ASP.NET page.
> > >
> > > I need to be able to select ALL items in the Listbox BEFORE I issue a
> > > Server.Tranfer(url) even if the user has selected one or two.
> > > Unfortunately,
> > > when I retreive the value of the listbox in the new page
> > > (Request.Params["outputColumnsListBox"]) I only retreive what the user
> > > selects on the page.
> > > I tried something like this in the source page
> > >
> > > for (int i = 0; i < outputColumnsListBox.Items.Count; i++)
> > > {outputColumnsListBox.SelectedIndex = i;}
> > >
> > > but it does not work. How do I select ALL items and pass them to a new
> > > page?
> > > Thanks!
> > > Alberto
Kevin Spencer Guest
-
Luke Zhang [MSFT] #4
Re: ListBox
You can save the selected items in a session variant in the source page,
and retrieve them in the New page. Will this help on the problem?
Luke
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Luke Zhang [MSFT] Guest
-
Alberto #5
Re: ListBox
Hi Keven,
I have read your suggestion, but I am not sure how to proceed.
Doing this:
outputColumnsListBox.Items[i].Selected = true;
HttpContext.Current.Items.Add(outputColumnsListBox ,outputColumnsListBox.Items[i].Value);
causes an error "Item has already been added" since
outputColumnsListBox already exists... Do I have to add another
object?
If so, fine, but how do I then call it from the next page?
Right now I use Request.Params["outputColumnsListBox"] which does
return the selected fields, but only the selected ones.
Ciao,
Alberto
"Kevin Spencer" <kevin@takempis.com> wrote in message news:<ugE6xmjSDHA.1252@TK2MSFTNGP10.phx.gbl>...> I would recommend adding the items to the HttpContext. As you're using
> Server.Transfer, you should be able to grab them back out of it in the
> target page.
>
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> [url]http://www.takempis.com[/url]
> Big things are made up of
> lots of little things.
>
> "Alberto" <aconti@stsci.edu> wrote in message
> news:633f92d6.0307140914.40fa0441@posting.google.c om...> news:<O0zCwhZSDHA.2256@TK2MSFTNGP11.phx.gbl>...> > Hi Keven,
> >
> >
> > doing this
> >
> > for (int i = 0; i < outputColumnsListBox.Items.Count; i++)
> > {outputColumnsListBox.Items[i].Selected = true;}
> >
> > will indeed set the items to "selected", however I still cannot pass
> > the selected items to a new asp.net page. Somehow the page does not
> > know that all items have been selected.
> >
> > Alberto
> >
> >
> > "Kevin Spencer" <kevinDIESPAMMERSDIE@takempis.com> wrote in message> are> > > A Listbox can only have ONE SelectedIndex. It can have many options that> > > selected, though. Set the "selected" property of the list Items.
> > >
> > > --
> > > HTH,
> > >
> > > Kevin Spencer
> > > .Net Developer
> > > Microsoft MVP
> > > [url]http://www.takempis.com[/url]
> > > Big things are made up
> > > of lots of little things
> > >
> > > "Alberto" <aconti@stsci.edu> wrote in message
> > > news:633f92d6.0307131515.4dfe0a36@posting.google.c om...
> > > > Hi,
> > > >
> > > > I have an ASP.NET application with C# code behind that has a ListBox.
> > > > The user is allowed to decide the order and the number of items in the
> > > > list box. The items make up a list of output columns to be displayed
> > > > in a new page.
> > > > Once the user is satisfied, he/she will hit Submit and the values of
> > > > *ALL* listbox items remaining have to be passed to a new ASP.NET page.
> > > >
> > > > I need to be able to select ALL items in the Listbox BEFORE I issue a
> > > > Server.Tranfer(url) even if the user has selected one or two.
> > > > Unfortunately,
> > > > when I retreive the value of the listbox in the new page
> > > > (Request.Params["outputColumnsListBox"]) I only retreive what the user
> > > > selects on the page.
> > > > I tried something like this in the source page
> > > >
> > > > for (int i = 0; i < outputColumnsListBox.Items.Count; i++)
> > > > {outputColumnsListBox.SelectedIndex = i;}
> > > >
> > > > but it does not work. How do I select ALL items and pass them to a new
> > > > page?
> > > > Thanks!
> > > > AlbertoAlberto Guest
-
Alberto #6
Re: ListBox
Hi,
I have solved the problem. I really did not want to save this list in
a session variable, so I created a property of the source page that I
can call from the destination page.
Thanks for your help.
Alberto
[email]lukezhan@online.microsoft.com[/email] (Luke Zhang [MSFT]) wrote in message news:<0qho$YnSDHA.1928@cpmsftngxa06.phx.gbl>...> You can save the selected items in a session variant in the source page,
> and retrieve them in the New page. Will this help on the problem?
>
> Luke
>
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)Alberto Guest
-
moskito_pt webforumsuser@macromedia.com #7
listbox
Hi,
I have many listbox and the items added come from a listbox1 to a listbox2 and ... in the last I need a action in each item to open (load) a movie.
By clicking in the item it automaticly open the movie.
How can we make this?
Help me pls, Tk.
moskito_pt webforumsuser@macromedia.com Guest



Reply With Quote

