asp.net - How to save connection request to database in this scenario -


I am new to asp.net and know a bit about its work and as I am moving forward I am getting new and more new suspicion

I was working with two RadioLists at this time which are loading on page loads.

Now when a user changes the indicator of the radio button, the list 1. The second one needs to be updated essentially, what is the price set for the currently selected radio button. Since the page will be posted back, so I have to urgently ask a query to get new data from the database for the selected index or the form of the dataset as session Can store 2-3 tables in .

What should I do in this scenario should I re-request a SQL query or retrieve the dataset from the session .

What is the most favorable approach for this and why?

The radio button should not be retrieved from the data database for list 1 (rbl1). It should already be populated by viewtest. It is an invisible object on your page that keeps track between loading your control contents in the browser and returning back to the server. If you rebuild RLB 1 for data on a postback, then you will lose the current selection.

There should be nothing wrong in retrieving the data to send the radiooton list from the data, if the results are going to change depending on the first selection

However, If the data size is small then you want to cache the results in the cache, if all users see the same set of data, or the session cache if it is user-based

Then you will get the first time radiobontonalis You can use the link to query the data based on the selection.

  & lt; Asp: RadioButtonList ID = "rbl1" runat = "server" autoptback = "true" on-select index = "RLBII-integrated inductive switching" & gt; Protected Zero Page_Load (object sender, event events e) {if (! IsPostBack) {// your RLB 1 tied here}} Secure RAB 1 selected index (Object Sender, EventArgse E) {// Load your second radio button list Load first}  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -