Hi,
I need to do the usual i.e design a form to get user registration details.
I need to allow him to select his country ,state city but i figure making three separate postbacks would greatly reduce the performance.

Alternatively i was planning to fetch the whole data at client and then sort through it by querying it somehow.
Is it possible??How??

Thanks in advance

Dani AI

Generated

raised the right concern: three full page postbacks for country → state → city will slow the UI. Two practical patterns work well: preload the entire dataset to the browser and filter with JavaScript (fast for small data), or request dependent lists on demand with lightweight AJAX/web‑methods (scales better). 's question about the control is relevant — any standard <select> (DropDownList) can be driven client‑side; avoid server postbacks on change.

A minimal, robust pattern for ASP.NET WebForms (VB) is a Shared WebMethod that returns a small JSON array (id/name) and a short jQuery AJAX call to populate the child dropdown. The WebMethod must be Shared and marked with <WebMethod>. jQuery will receive the data in response.d when calling page methods.

Code samples:

<System.Web.Services.WebMethod()> _
Public Shared Function GetStates(countryId As Integer) As List(Of Dictionary(Of String, Object))
    ' server: query DB, build list of { "Id"=x, "Name"="..." } and return
End Function
// client: POST JSON to /Page.aspx/GetStates, fill dropdown from response.d
$.ajax({
  type: "POST",
  url: "Register.aspx/GetStates",
  data: JSON.stringify({ countryId: id }),
  contentType: "application/json; charset=utf-8",
  dataType: "json",
  success: function(r){ /* populate select with r.d */ }
});

Practical tips: return only id+name to keep payload tiny, enable gzip on the site, cache server results, and consider localStorage for repeat visits. Avoid UpdatePanel for frequent cascading calls — its viewstate overhead is heavier than a small JSON AJAX call.

which control u r using to bind data.

I am using a datareader to fetch the data and then a drop down to show the values.

Does that help??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.