views:

283

answers:

2

I have a dropdown menu in my ASP .NET 2.0 C# page and when the user selects any item, a bunch of labels ad text boxes are updates with new info, but currently, my page does a postback and is re-rendered.

What is the easiest (or shortest) way of getting the fields to update without a postback? I am getting the data off sql server.

+1  A: 

If you want to do it without a postback, you'll need to use javascript to make an AJAX request. I'd suggest using JQuery to do it, as that is really the easiest.

If you just want to do it without refreshing the entire page, you could accomplish the task with an UpdatePanel, which might be the easiest overall thing to do, if not the most performant.

womp
I dont have the option to use the update panel.
Jaelebi
I would go the javascript route then.
womp
A: 

If there is not much data you could send all at once to the page, and let javascript alone handle the events and all th changing will be done at the client side. However, if there is a lot of data then you should do some javascript async requests (pretty much like AJAX) to get the data from the server based on your events.

Freddy