Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
I am working on a project in which on selecting a drop down list item the values from the database should appear in the respective two text boxes.
But, alongside I am placing an image which is actually getting created based on the two values. Now on selecting the next dropdownlist item there is a page refresh and the placed image dissapears.
How to I avoid the page refresh keeping in mind that the fields from the database must get displayed on the page in the two fields on select of drop down list.
Kindly help!
thanks...
In my case, there exists a table in which there are two halfs, the left has text boxes n a button n to the right side of the table the image appears.
Posted 26-Nov-12 0:16am
Ash29465
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
Put the piece of code which you want to refresh into UpdatePanel and put the image outside of update panel.
 
Or you can regenerate the image from the code behind again.
 
Refer below link to work with update panel.
 
Updatepanel in ASP.NET (Ajax)[^]
 
http://msdn.microsoft.com/en-us/library/bb399001%28v=vs.100%29.aspx[^]
  Permalink  
v2
Comments
Ash29 at 26-Nov-12 6:59am
   
ohk
thanks
wil give it a try n update with the latest
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hi
Can you set the AutoPostBack to false in dropdownlist
  Permalink  
Comments
Ash29 at 26-Nov-12 7:01am
   
thanks for the reply,
on setting AutoPostBack to false in dropdownlist the text box items doesnt fetch the database items. I guess page refresh is necessary to fetch the database stored items.
is it?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi,
 
Put your Autopostback property of dropdown list as "False".It will solve your problem.
 
Thanks,
Mukesh Kumar
  Permalink  
Comments
Ash29 at 27-Nov-12 6:49am
   
thanks for the reply,
on setting AutoPostBack to false in dropdownlist the text box items doesnt fetch the database items. I guess page refresh is necessary to fetch the database stored items.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 225
1 Sergey Alexandrovich Kryukov 167
2 _Amy 155
3 CHill60 130
4 Manfred R. Bihy 130
0 OriginalGriff 7,320
1 Sergey Alexandrovich Kryukov 6,043
2 Maciej Los 3,754
3 Peter Leow 3,448
4 CHill60 2,572


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100