473,396 Members | 1,756 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,396 software developers and data experts.

Implement a modal Dialog box in ASP.NET web app

I need to implement a Dialog box in my Web application.

The dialog box pops up with "OK", "Show Details", "Show Image" buttons
when the user clicks a marked point on a chart. I need to pass the
numeric value of the point into the Dialog Box.
And after the user selects "Show Details" or "Show Image" buttons, I
need to pass that value into another web form to display the required
details.

How can I implement this? Can someone give me some sample code for the
javascript functions I need to incorporate in my C# code.

Nov 17 '05 #1
2 12095
You have to do this in JavaScript using the showModalDialog function.

"Ritu Kachroo" <ri*********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I need to implement a Dialog box in my Web application.

The dialog box pops up with "OK", "Show Details", "Show Image" buttons
when the user clicks a marked point on a chart. I need to pass the
numeric value of the point into the Dialog Box.
And after the user selects "Show Details" or "Show Image" buttons, I
need to pass that value into another web form to display the required
details.

How can I implement this? Can someone give me some sample code for the
javascript functions I need to incorporate in my C# code.

Nov 17 '05 #2
Thanks Peter.. I know the functions to use.. am just not sure about the
implementation..
So, I need some sample code for the javascript functions.

I am currently using the following piece of code to open the popup
window:

string javStr = "<script> var
win=window.showModalDialog('popup.aspx',null,'cent er:yes;status:no;dialogWidth:425px;dialogHeight:10 0px;toolbar:yes;dialogHide:true;help:no;scroll:no' );</script>";
if(!this.IsStartupScriptRegistered("OpenWin"))
this.RegisterStartupScript("OpenWin", javStr);

But the problem with that is it opens the popup window twice!
What am I doing wrong ?

Secondly, I need to know how to pass the value of a local variable from
the parent form into the popup form.

And last, how to retrieve that value in the popup form (using
window.returnValue function).

Nov 17 '05 #3

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

Similar topics

2
by: Patrick Lim | last post by:
Here is the problem: I have written a non-modal frame class in Java for displaying help text when a user is using an application. It works as desired in that if the user selects "help" again,...
2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
2
by: Gilles T. | last post by:
Hi, How I can refresh a modal dialog in asp.net? I open a modal dialog in first with a dropdownlist. To add a element in my dropdownlist (table), I open a second modal dialog to ask element and...
2
by: cassidyc | last post by:
Hi, I was wondering if anyone has come accross this issue? And if they have any solutions I have that can create new copies of itself Form1 as = new form1(); af.show(); This form can also...
3
by: Earl Teigrob | last post by:
Can a Modal Dialog Box do forms ASP.NET forms validation from within the Modal Box? I want to pop up a dialog box to the user and have it do its own post backs with validation checking and then...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
11
by: VK | last post by:
In the continuation of the discussion at "Making Site Opaque -- This Strategy Feasible?" and my comment at http://groups.google.com/group/comp.lang.javascript/msg/b515a4408680e8e2 I have...
2
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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...
0
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...
0
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,...

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.