Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > get the value of dropdownList

Reply
Thread Tools

get the value of dropdownList

 
 
Wen Ou
Guest
Posts: n/a
 
      06-21-2005
hi

i got a problem about dropdownlist. i set autopostback true. when its index
changed, i would like to get its value before changed and compare with the
value after changed. i don't have any idear about that.

anyone can help me

thank you

wen ou


 
Reply With Quote
 
 
 
 
Michael Baltic
Guest
Posts: n/a
 
      06-29-2005
Create a new control and inherit from the dropdownlist. Add a property for
the previous value.

When the dropdownlist is filled with items, set the previos value to null.
All other times, just put the current value into the previous value AFTER you
read the contents of the previous value.

Make sure the value is persisted in state.
--
Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group

Future Business Model - National City Mortgage


"Wen Ou" wrote:

> hi
>
> i got a problem about dropdownlist. i set autopostback true. when its index
> changed, i would like to get its value before changed and compare with the
> value after changed. i don't have any idear about that.
>
> anyone can help me
>
> thank you
>
> wen ou
>
>

 
Reply With Quote
 
 
 
 
Wen Ou
Guest
Posts: n/a
 
      06-29-2005
Hi Michael
thank you for your respondance
i still don't understand your answer. could you give me more details please

thank you
wen ou

"Michael Baltic" wrote:

> Create a new control and inherit from the dropdownlist. Add a property for
> the previous value.
>
> When the dropdownlist is filled with items, set the previos value to null.
> All other times, just put the current value into the previous value AFTER you
> read the contents of the previous value.
>
> Make sure the value is persisted in state.
> --
> Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
>
> Future Business Model - National City Mortgage
>
>
> "Wen Ou" wrote:
>
> > hi
> >
> > i got a problem about dropdownlist. i set autopostback true. when its index
> > changed, i would like to get its value before changed and compare with the
> > value after changed. i don't have any idear about that.
> >
> > anyone can help me
> >
> > thank you
> >
> > wen ou
> >
> >

 
Reply With Quote
 
Michael Baltic
Guest
Posts: n/a
 
      06-30-2005
Do you know how to create an inherited control? If not, I can give you some
sample code.

My email user id is Michael.Baltic the domain is NCMC.com (That should stop
an automated spammer?)

If you don't want to create an inherited control, you can use session
variables to save the value. Each time you read the current value, save it
to the previous value (after you read the contents of the previous value)
--
Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group

Future Business Model - National City Mortgage


"Wen Ou" wrote:

> Hi Michael
> thank you for your respondance
> i still don't understand your answer. could you give me more details please
>
> thank you
> wen ou
>
> "Michael Baltic" wrote:
>
> > Create a new control and inherit from the dropdownlist. Add a property for
> > the previous value.
> >
> > When the dropdownlist is filled with items, set the previos value to null.
> > All other times, just put the current value into the previous value AFTER you
> > read the contents of the previous value.
> >
> > Make sure the value is persisted in state.
> > --
> > Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
> >
> > Future Business Model - National City Mortgage
> >
> >
> > "Wen Ou" wrote:
> >
> > > hi
> > >
> > > i got a problem about dropdownlist. i set autopostback true. when its index
> > > changed, i would like to get its value before changed and compare with the
> > > value after changed. i don't have any idear about that.
> > >
> > > anyone can help me
> > >
> > > thank you
> > >
> > > wen ou
> > >
> > >

 
Reply With Quote
 
Wen Ou
Guest
Posts: n/a
 
      06-30-2005
i don't like to use session variable. could you give some sample code of
inherited control please

thank you

wen ou

"Michael Baltic" wrote:

> Do you know how to create an inherited control? If not, I can give you some
> sample code.
>
> My email user id is Michael.Baltic the domain is NCMC.com (That should stop
> an automated spammer?)
>
> If you don't want to create an inherited control, you can use session
> variables to save the value. Each time you read the current value, save it
> to the previous value (after you read the contents of the previous value)
> --
> Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
>
> Future Business Model - National City Mortgage
>
>
> "Wen Ou" wrote:
>
> > Hi Michael
> > thank you for your respondance
> > i still don't understand your answer. could you give me more details please
> >
> > thank you
> > wen ou
> >
> > "Michael Baltic" wrote:
> >
> > > Create a new control and inherit from the dropdownlist. Add a property for
> > > the previous value.
> > >
> > > When the dropdownlist is filled with items, set the previos value to null.
> > > All other times, just put the current value into the previous value AFTER you
> > > read the contents of the previous value.
> > >
> > > Make sure the value is persisted in state.
> > > --
> > > Staff Consultant II - Enterprise Web Services - Cardinal Solutions Group
> > >
> > > Future Business Model - National City Mortgage
> > >
> > >
> > > "Wen Ou" wrote:
> > >
> > > > hi
> > > >
> > > > i got a problem about dropdownlist. i set autopostback true. when its index
> > > > changed, i would like to get its value before changed and compare with the
> > > > value after changed. i don't have any idear about that.
> > > >
> > > > anyone can help me
> > > >
> > > > thank you
> > > >
> > > > wen ou
> > > >
> > > >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
get the selected value of the asp:dropdownlist in javascript Thierry ASP .Net 3 02-15-2010 08:43 AM
How can I get a label's value in a datagrid for a dropdownlist? needin4mation@gmail.com ASP .Net 1 07-25-2005 02:15 PM
How to get DropDownList's value of a DataGrid ? S.Y.C ASP .Net 0 10-17-2003 08:05 AM
How to get value of dynamic DropDownList in User Control ? Piotr Strycharz ASP .Net 7 09-30-2003 11:37 AM
ASP.NET - DropDownList Get's First Select value Micheal ASP .Net 1 07-30-2003 08:10 PM



Advertisments