Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Click event in a datalist to post back datalist properties

Reply
Thread Tools

Click event in a datalist to post back datalist properties

 
 
Steve Lloyd
Guest
Posts: n/a
 
      05-25-2004
Hi there,

I have built a data list that contains dropdownlists that are populated
depending on details of the item in the datalist by adding a datasource to
the drop downs as part of the itembound event, which has all worked very
nicely... My problem is that i want to use a click event on a LinkButton
that is part of the datalist item and use the information selected in the
combobox as part of the server side click event.

can anyone point me in the right direction pls.

Thanks for any help.

Steve Lloyd


 
Reply With Quote
 
 
 
 
Rick Spiewak
Guest
Posts: n/a
 
      05-26-2004
During the page load event, if it is a postback, check for the edititemindex
<> -1. This means that you are in edit mode.
Use the edititemindex to get to the correct "row" in the datalist, and find
the LinkButton control - easier if you use a template,
so you'll know what its ID is. Add the event handler to the LinkButton at
this point.

"Steve Lloyd" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi there,
>
> I have built a data list that contains dropdownlists that are populated
> depending on details of the item in the datalist by adding a datasource to
> the drop downs as part of the itembound event, which has all worked very
> nicely... My problem is that i want to use a click event on a LinkButton
> that is part of the datalist item and use the information selected in the
> combobox as part of the server side click event.
>
> can anyone point me in the right direction pls.
>
> Thanks for any help.
>
> Steve Lloyd
>
>



 
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
When user press F5 after a button click event, the click event fires again! Max2006 ASP .Net 2 09-19-2007 05:37 AM
How does a dynamic control load post back data across post back?? =?Utf-8?B?Z29yaWxsYQ==?= ASP .Net 1 05-25-2007 05:02 AM
Wire up a click event within another click event doesn't work... Chu ASP .Net 2 04-10-2006 10:43 PM
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 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



Advertisments