Click here to Skip to main content
14,492,569 members
Rate this:
Please Sign up or sign in to vote.
See more:
hello;

I need example how to refresh combo box in form1 when the user add new item in form2
ex:-
I need add new city in form2 when close this form I want to add new item in combobox whitout refresh page
Posted
Updated 24-Mar-11 2:08am
v2

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Because asp.net only allows 1 form declaration per page I have to assume you are referring to different windows and you wish to select something in one window and have it reflect in the other.

Now the sleekest solution would be to use javascript and a application called lightbox (its a kind of window popup very clean and neat. then use javascript to do the transfer based on the selection.

The other bit more advanced option would be using a web service and javascript, when an object is chosen in form 2 it sets a Session variable , then in form 1 use a java-script Interval method to run a method in the web service that will look for that saeeion variable change. but this is far more complicated and will be overkill for a simple app.
   
Comments
mohammad ayyash 24-Mar-11 12:29pm
   
i need example about javascript or any solve for this problem

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




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