Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > dynamic listItems - event NOT fired

Reply
Thread Tools

dynamic listItems - event NOT fired

 
 
preetith
Guest
Posts: n/a
 
      08-26-2003
Hello,
Though there are numerous posts on this issue , there
are no answers at all to any of them !!
My Situation is , I have a dropdownlist that gets
populated on a button click event, this works fine but
when I select an item on this dropdownlist ,
SelectedIndexChanged event does not get fired.The reason
is that the dynamically created listitems are lost between
the posts ...Can someone provide a solution to my problem ?

thanks,
preeti

 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      08-26-2003
There are answers but people only say that because they are too lazy to
search for it. you must hook your event handler code in page load every
time. otherwise it won't behave right.

"preetith" <(E-Mail Removed)> wrote in message
news:07eb01c36ba5$ee8e60b0$(E-Mail Removed)...
> Hello,
> Though there are numerous posts on this issue , there
> are no answers at all to any of them !!
> My Situation is , I have a dropdownlist that gets
> populated on a button click event, this works fine but
> when I select an item on this dropdownlist ,
> SelectedIndexChanged event does not get fired.The reason
> is that the dynamically created listitems are lost between
> the posts ...Can someone provide a solution to my problem ?
>
> thanks,
> preeti
>



 
Reply With Quote
 
 
 
 
Ken Cox [Microsoft MVP]
Guest
Posts: n/a
 
      08-27-2003
Can you show us the complete code that is failing?

Do you have autopostback set to true?
Are you mistakenly resetting the control on each postback?

Ken

--
Microsoft MVPs have a question for *you*: Are you patched against the Worm?
http://www.microsoft.com/security/se...s/ms03-026.asp



"preetith" <(E-Mail Removed)> wrote in message
news:07eb01c36ba5$ee8e60b0$(E-Mail Removed)...
Hello,
Though there are numerous posts on this issue , there
are no answers at all to any of them !!
My Situation is , I have a dropdownlist that gets
populated on a button click event, this works fine but
when I select an item on this dropdownlist ,
SelectedIndexChanged event does not get fired.The reason
is that the dynamically created listitems are lost between
the posts ...Can someone provide a solution to my problem ?

thanks,
preeti


 
Reply With Quote
 
preetith
Guest
Posts: n/a
 
      08-27-2003
Thanks Ken and Alvin for replying to my query.
I had done all that you both have mentioned but what I
missed was the uniqueID.My DDL is embedded within a TABLE
heirarchy and all the tables are not given uniqueIDs hence
the control's event did not get fired.Now am creating the
DDL dynamically and adding it to the tablecell and it
automatically receives a uniqueID and remembers it between
posts.
regards,
preeti

>-----Original Message-----
>There are answers but people only say that because they

are too lazy to
>search for it. you must hook your event handler code in

page load every
>time. otherwise it won't behave right.
>
>"preetith" <(E-Mail Removed)> wrote in message
>news:07eb01c36ba5$ee8e60b0$(E-Mail Removed)...
>> Hello,
>> Though there are numerous posts on this issue ,

there
>> are no answers at all to any of them !!
>> My Situation is , I have a dropdownlist that gets
>> populated on a button click event, this works fine but
>> when I select an item on this dropdownlist ,
>> SelectedIndexChanged event does not get fired.The reason
>> is that the dynamically created listitems are lost

between
>> the posts ...Can someone provide a solution to my

problem ?
>>
>> thanks,
>> preeti
>>

>
>
>.
>

 
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
Embedded <divs> with events: How to prevent the parent div's eventfrom being fired when the embedded div's event is fired? Num GG Javascript 2 11-17-2008 08:56 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Building Controls 1 05-28-2004 06:23 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Datagrid Control 0 05-25-2004 01:45 AM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net Web Controls 0 05-25-2004 01:45 AM



Advertisments