0

I'm using a repeater on my page. I want to populate this repeater based on a selection from a dropdown but with no page refresh.

Here is the sequence of events:

  1. user selects an item in a dopdown
  2. Show the results (bind a server-side control and then render it back to the page)

Now to show the results I need to call a server-side method where I pass a couple Ids from the client to the server and then the server rebinds the control using some logic in the code-behind of this page.

Not sure if this is possible. I tried to do a redirect and send the values through a querystring but obviously that performs a refresh of the page.

I'm simply trying to call a code-behind (server-side) method after the user selects a dropdown item and then just paint the results from the now bound repeater on the page using jQuery's .html().

I think this isn't possible with a repeater because it's server-side right? If not I'll just have to make a jquery ajax call to my handler like I've done and just paint the response html that I created back to a div on the page to create the list instead of a repeater.

I ask because I'm trying to also use the jqGrid...figured there was a way I can update the grid after a user selects something in another dropdown on my page and perform some kind of ajax call to somehow bind that grid but the jqGrid is a server-side control...so I do not think it's possible?

PositiveGuy
  • 46,620
  • 110
  • 305
  • 471

1 Answers1

0

Maybe you can use ASP.net control named "UpdatePanel" (MSDN) in place of client side jquery code.

Only The controls in the panel will be refreshed. Take care with repeater I think the attribute "ChildrenAsTriggers" of update panel doesn't work you have to declare the dropdown list as a trigger.

Or Maybe you can consume a asmx webService with Jquery to bind manually the repeater.. But I never made that.. (For example)

Community
  • 1
  • 1
bAN
  • 13,375
  • 16
  • 60
  • 93
  • thanks but no thanks, I wish that update panel was never born. I found that this jqGrid is a server-side control. I need to use just the client-side control which is free too. Yes to your web service. But you can't bind a repeater with jquery, that's client side code and a repeater is server-side. – PositiveGuy Nov 03 '11 at 02:08