Opening a new window / dialog:

G

Guest

Hey guys,

I've got a C# Web Application written in .NET 2.0 in C#. I'd like to
add a "Tree-View" component to the form so that they can easily select the
"subject" of the form. However, I would prefer to have the tree-view form on
a dialog window that pops up, they select the item from the tree-view, and
then it populates back the TEXT to a text box on the main window.

My question is, what is the best way to go about doing this? How do I make
VS2005 open a new window (and set the dimensions), and then have it return
the data to the previous form?

Anyone have any code examples?


Thanks!!!

Todd
 
G

Guest

MVC pattern.
hanve a controller reponsisble for the UI presetnation and the data transfer
between them.
The trasfered data define by interface the contoller manage.

So,

You have 2 dialog hold the trasfered interafce, the controller call the
dialog 2 from dialog 1, listen to close event from dialog 2 then send the
tree text value to dialog 1.
 
N

Nicholas Paldino [.NET/C# MVP]

Todd,

Generally, to do this, you will have to use javascript code on the
client to open a URL in a new window. This window would then have a
reference to the original window that you want to control the form.

You could also use AJAX (to get the contents of the tree view) and then
show a new div section which overlays the form (like a flyout). I think
that's a much better user experience than opening a new form.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

You can use window.open to open a new form. then when selected you can use
window.opener to access the parent form.

If you are using Atlas there are others options like ModalPopup extender.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top