473,323 Members | 1,550 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Opening a new window / dialog:

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
Aug 21 '07 #1
3 1736
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.

--
Sincerely
Yaron Karni
http://dotnetbible.blogspot.com/
"Todd Jaspers" wrote:
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
Aug 21 '07 #2
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Todd Jaspers" <To*********@discussions.microsoft.comwrote in message
news:36**********************************@microsof t.com...
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

Aug 21 '07 #3
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.

"Todd Jaspers" <To*********@discussions.microsoft.comwrote in message
news:36**********************************@microsof t.com...
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

Aug 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: N. Graves | last post by:
Hi, I want to have a Search Dialog box that has several text box and fields to build a search and display the results in a form. I can do everything that I need to if I us a report but I would...
7
by: mg | last post by:
Once opening WebForm2 from WebForm1 using Response.Write("<script language='javascript'>window.open ('WebForm2.aspx','two','menubar=no');</script>"); how can I close WebForm1?
5
by: REB | last post by:
Can someone help me with adding some javascript functionality to a button? What would the proper syntax for for (please help with the javascript I am rusty) for doing this: ...
2
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click...
2
by: Jacky Chau | last post by:
I have a modal dialog opened using window.showModalDialog. When that modal dialog closes, it causes the parent form to postback. Is there any way to stop it from forcing the parent page to...
6
by: SkeanDu | last post by:
Ok, here is my problem. I have an aspx page that displays a databound datagrid and in one of the datagrid column headers I have an image that when clicked opens up a modal web dialog (another...
3
by: yup | last post by:
I was wondering if you know a way to have, let's say, you would click on a menu bar item (where something like file, edit, format, help options are on Microsoft Word) and instead of opening a...
16
by: MLH | last post by:
If I give someone a runtime app, they can open the database window by pressing the F-11 key. How to prevent???
0
by: aarthiraaj | last post by:
In my user screen I have view link, if I click this link it will go to servlet and open one word document. It is opening properly, but while opening the attachment it generate one dialog box like...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.