[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Damen

1/16/2003 6:02:00 PM

Hi,

Let's put this in some points;

1-I have a DropDownList Bound to a DataSet
2-I want to read the SelectedItem when i press the save button
3-I don't want to use AutoPostBack=True (for speed)
4-But without it i don't know the SelectedItem
5-It always returns the first SelectedItem (the first in the first
Page_Load)

Does anyone knows how can i send the client DropDownList information back to
server without AutoPostBack=True?

Sorry for the telegram, but for me (i am not english) makes it easier to
explain!!

Thank you,

Ricardo.




4 Answers

Patrice Scribe

1/17/2003 5:13:00 PM

0

Make sure you are just handling the click of the button server side. You may
have perhaps some other server side event that you don't need (especially on
the list).

You need to hit the server again *one* time if you want the info to be known
by the server ! If you have a problem of speed this is likely :
- because you do that repeateadly. In this case I would rather suggest to
change the UI. For example you could use a multiselect list or chekboxes if
you want to be able to select several values (rather than to pick one at a
time) and then doing a single server hit.
- because you have other server side event (remove them if you don't need
them). It includes validating the input as the list changes. Just validate
when the final input is submitted.

Patrice

"Damen" <dm.development@netcabo.pt> a écrit dans le message de news:
#YCWmEYvCHA.1644@TK2MSFTNGP09...
> Hi,
>
> Let's put this in some points;
>
> 1-I have a DropDownList Bound to a DataSet
> 2-I want to read the SelectedItem when i press the save button
> 3-I don't want to use AutoPostBack=True (for speed)
> 4-But without it i don't know the SelectedItem
> 5-It always returns the first SelectedItem (the first in the first
> Page_Load)
>
> Does anyone knows how can i send the client DropDownList information back
to
> server without AutoPostBack=True?
>
> Sorry for the telegram, but for me (i am not english) makes it easier to
> explain!!
>
> Thank you,
>
> Ricardo.
>
>
>
>


joao casa

1/18/2003 10:07:00 AM

0

Hi, this is just a feeling.
I had the same problem months ago, and then i saw that
when i load the dataset to bind i haven't the: if (!
page.ispostback), so any click i made the control is
rebound and the selected is always the first.
Hope it helps.

>-----Original Message-----
>Hi,
>
>Let's put this in some points;
>
>1-I have a DropDownList Bound to a DataSet
>2-I want to read the SelectedItem when i press the save
button
>3-I don't want to use AutoPostBack=True (for speed)
>4-But without it i don't know the SelectedItem
>5-It always returns the first SelectedItem (the first in
the first
>Page_Load)
>
>Does anyone knows how can i send the client DropDownList
information back to
>server without AutoPostBack=True?
>
>Sorry for the telegram, but for me (i am not english)
makes it easier to
>explain!!
>
>Thank you,
>
>Ricardo.
>
>
>
>
>.
>

Damen

1/20/2003 9:53:00 AM

0

Thank you Patrice

Ricardo


"Patrice Scribe" <scribe@chez.com> wrote in message
news:#KnLSNkvCHA.1624@TK2MSFTNGP10...
> Make sure you are just handling the click of the button server side. You
may
> have perhaps some other server side event that you don't need (especially
on
> the list).
>
> You need to hit the server again *one* time if you want the info to be
known
> by the server ! If you have a problem of speed this is likely :
> - because you do that repeateadly. In this case I would rather suggest to
> change the UI. For example you could use a multiselect list or chekboxes
if
> you want to be able to select several values (rather than to pick one at a
> time) and then doing a single server hit.
> - because you have other server side event (remove them if you don't need
> them). It includes validating the input as the list changes. Just validate
> when the final input is submitted.
>
> Patrice
>
> "Damen" <dm.development@netcabo.pt> a écrit dans le message de news:
> #YCWmEYvCHA.1644@TK2MSFTNGP09...
> > Hi,
> >
> > Let's put this in some points;
> >
> > 1-I have a DropDownList Bound to a DataSet
> > 2-I want to read the SelectedItem when i press the save button
> > 3-I don't want to use AutoPostBack=True (for speed)
> > 4-But without it i don't know the SelectedItem
> > 5-It always returns the first SelectedItem (the first in the first
> > Page_Load)
> >
> > Does anyone knows how can i send the client DropDownList information
back
> to
> > server without AutoPostBack=True?
> >
> > Sorry for the telegram, but for me (i am not english) makes it easier
to
> > explain!!
> >
> > Thank you,
> >
> > Ricardo.
> >
> >
> >
> >
>
>


Damen

1/20/2003 9:55:00 AM

0

Thank you to the one how likes dotnet!!(sorry but i don't know your name)

Ricardo

<like@dotnet.pt> wrote in message
news:005a01c2bed1$07169d00$8ef82ecf@TK2MSFTNGXA04...
> Hi, this is just a feeling.
> I had the same problem months ago, and then i saw that
> when i load the dataset to bind i haven't the: if (!
> page.ispostback), so any click i made the control is
> rebound and the selected is always the first.
> Hope it helps.
>
> >-----Original Message-----
> >Hi,
> >
> >Let's put this in some points;
> >
> >1-I have a DropDownList Bound to a DataSet
> >2-I want to read the SelectedItem when i press the save
> button
> >3-I don't want to use AutoPostBack=True (for speed)
> >4-But without it i don't know the SelectedItem
> >5-It always returns the first SelectedItem (the first in
> the first
> >Page_Load)
> >
> >Does anyone knows how can i send the client DropDownList
> information back to
> >server without AutoPostBack=True?
> >
> >Sorry for the telegram, but for me (i am not english)
> makes it easier to
> >explain!!
> >
> >Thank you,
> >
> >Ricardo.
> >
> >
> >
> >
> >.
> >