473,587 Members | 2,547 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1748
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.co m

"Todd Jaspers" <To*********@di scussions.micro soft.comwrote in message
news:36******** *************** ***********@mic rosoft.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*********@di scussions.micro soft.comwrote in message
news:36******** *************** ***********@mic rosoft.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
2094
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 like to have the search from data displayed in a form. The structure that I have for this was take from the Asset Manger from MS. Anyway I open...
7
2225
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
1616
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: btnMyButton.Attributes.Add("onclick", **Open a new window with no toolbar or address bar to address http://mysite.com/viewer.aspx?key= +...
2
2080
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 handler that builds a url and then registers a startup script to open a modal dialog window. With XP SP2 installed the pop-up blocker stops the windows...
2
2908
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 postback? There's no need for the parent page to postback when receiving data from the modal dialog. *** Sent via Developersdex...
6
2428
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 aspx page). >From this dialog I want the users to be able to select a filter item from a databound combobox and click on the apply button on the web...
3
1748
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 dialog box it would "switch" to another page (within the program) and maintain the same menu bar as before. For example, in Quicken I would click on...
16
6252
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
3765
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 file Open, Save or Cancel button, if I click open after that it is opening the document. But my query is it should not display this dialog box, once I...
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7849
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8347
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6626
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5394
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.