Im embeding two webparts in my sharepoint page using page viewer. One part is UI which takes input from user and on submit it shud be passed to other web part and it should get refreshed. can anyone help with this?
You can connect two webparts by following link V-B mentioned in comment, however you can also use Ajax Update Panel in one webpart to get your work done but it depends on what your trying to do.
e.g. having 2 update panels selecting something in one panel will produce results in 2nd panel without any postback.
If you want two webparts to talk to each other than you would need to make an Interface class. The interface class connects the consumer and provider class through inheritance.
Its quite easy but if you want to have an ajax updatepanel to performe a partial postback then that is a different ballgame its quite hard to figure out as its a hit or miss with sharepoint 2007 but for 2010 I think they have solved this issue! otherwise if you dont mind a post back than its perfect to share data between two or multiple webparts :)
So you have your interface class that basicly links the provider and consumer class that will inherit from it, once you have done the three seperate webparts or one webpart with three classes you can then connect the two webparts when editing the webpage!
so what you do in one webpart(provider) the other webpart would reflect the changes(consumer).
Here is a small tutorial, once you get your head around whats going on its easy:
The interface is a class but its inherits the interface like so ;)
As you can see this is in a seperate project in its own class that inherits the interface type, the class name is ITextBoxString
so all you need in the provider class is the following to inherit from this class:
As you can see this is another project with a class called StringProvider that inherits from the base class Webpart and it also inherits from the ITextBoxString interface class!
I hope this explains where im comming from, thanks for the correction :)
hope this helps :)