Solved

Problem on autopostback dropdownlist?

Posted on 2007-11-26
3
518 Views
Last Modified: 2012-06-27
Hello Experts,

I have a screen with 2 autopostback dropdownlists and a textarea. second dropdownlist is only display when select the item from the first dropdownlist.
once the second dropdownlist is selected, the appopriate data will display in textarea from database.
I have place the code(bind the data from database in textarea) in page postback's section in page load.
Now i display the data according to my request, but the problem is when i want to edit the data in textarea, because of the postback function that always call data from database, so i cant update the latest data into database.
May i know how to solve this?
0
Comment
Question by:sonny_j81
3 Comments
 
LVL 17

Expert Comment

by:gops1
ID: 20350260
One way is take the value put them inside request or session object and get it back else use Ajax to render the dropdown values. By Ajax you can avoid re rendering of a page.
0
 
LVL 37

Accepted Solution

by:
samtran0331 earned 500 total points
ID: 20351192
>>I have place the code(bind the data from database in textarea) in page postback's section in page load.

Don't bind the text area in page_load, bind it in the dropdownlist2_selectedindexchanged event
0
 
LVL 1

Author Comment

by:sonny_j81
ID: 20356675
Thanks samtran0331. You worth it.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now