Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Updated 18-Sep-17 21:10pm
v2

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[^]
 
Share this answer
 
v2
Comments
Ash29 26-Nov-12 6:59am    
ohk
thanks
wil give it a try n update with the latest
Hi
Can you set the AutoPostBack to false in dropdownlist
 
Share this answer
 
Comments
Ash29 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?
Hi,

Put your Autopostback property of dropdown list as "False".It will solve your problem.

Thanks,
Mukesh Kumar
 
Share this answer
 
Comments
Ash29 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900