Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 92421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:11:03+00:00 2026-05-10T23:11:03+00:00

I have a DataList control that displays a set of elements. Can anyone point

  • 0

I have a DataList control that displays a set of elements. Can anyone point me in the right direction on how I can add some client-side functionality for submitting/doing a postback when the user clicks an element in the list (e.g. anywhere in the that is the root of the list element. I’ve seen some examples by adding a hidden LinkButton and wiring it up – but I haven’t got it to work properly.

cheers,

–larsw


Thanks for the help – I went for the jQuery method. Do you know if I can invoke a hidden asp:LinkButton from the lambda function (for the selected item) so that a post back takes place?

There was a small typo in your code example (in case anyone else reads this thread): I had to add a # to the jQuery selector; ‘#<%= DataList1.ClientID %> td’

–larsw

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:11:04+00:00Added an answer on May 10, 2026 at 11:11 pm

    There isn’t such a thing as a ‘client side postback’, it’s an erronous statement. A postback implies submission to the server (or an external server).

    What you’re really looking for is adding some AJAX methods to your page. This can be done in a few ways:

    • UpdatePanel
    • Pure MS AJAX
    • Mixture of MS AJAX and jQuery (or other JavaScript library, I suggest jQuery due to it’s support within VS 2008)

    UpdatePanel Method

    This isn’t really the best idea if you’ve got a very heavy page. Have a look at a blog post I wrote if you want to get some more info on what to look out for – http://www.aaron-powell.com/blog.aspx?id=1195.

    Simply put UpdatePanels can be a dangerous choice if you don’t understand what the limitations are.

    MS AJAX and/ or jQuery

    This is my recommendation on what you should do. Use jQuery to locate all the elements in the DOM that you want to put the client events on, for example:

    $('#<%= DataList1.ClientID %> span').click(function () { alert('You want something here'); }); 

    David Ward has some good posts on using jQuery with ASP.NET/ ASP.NET AJAX – http://encosia.com/2008/03/27/using-jquery-to-consume-aspnet-json-web-services/ and http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

    Note: If you’re going to use an AJAX implementation you wont have access to the page’s control collection, it will all be static method interaction so be aware that if you want to update multiple sections of the page you’ll need to write JavaScript methods to do that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer You can easily apply a regex expression to a check… May 11, 2026 at 12:46 pm
  • added an answer as far as I know, if your data reside inside… May 11, 2026 at 12:46 pm
  • added an answer What's happening is that the regex validator is processing your… May 11, 2026 at 12:46 pm

Related Questions

I have a datalist control which some controls(ex: button) are in it. I want
I have a datalist with a OnDeleteCommand=Delete_Command. I want the delete a record with
I have a DataList like so: <asp:DataList ID=dlMyList runat=server RepeatColumns=5 RepeatDirection=Horizontal CellSpacing=5 > <ItemTemplate>
I have a table that is created in a DataList in ASP.Net. This table
At my current job we have a CMS system that is .NET/SQL Server based.
I have Datalist that is inside an updatepanel and it is in panel in
I have a basic test web form with a DataList and a DetailsView and

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.