Solved

Problem on autopostback dropdownlist?

Posted on 2007-11-26
3
531 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
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…

762 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