Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, please help me with this problem. When i click the asp:datagrid column it opens the alert modal dialog box. In that box i need to add a new button. Thanks in Advance
Posted
Comments
Albin Abel 22-Feb-11 22:55pm    
Hi, What you need to do with the button in the modal dialog?
angsumakal 22-Feb-11 23:01pm    
I need to create a new button named as trial in the modal dialog.

orc_orc_orc answer is right, here is straight javascript example

http://www.javascriptkit.com/javatutors/alert2.shtml[^]
 
Share this answer
 
Comments
Espen Harlinn 25-Feb-11 11:27am    
Good link, my 5
Yusuf 25-Feb-11 12:01pm    
Thanks
Well there are three dialog boxes that Javascript provides these are; alert() which displays a message and an OK button, confirm() which provides a message along with OK and cancel buttons and returns true if OK is pressed and false if cancel is pressed, and finally prompt() which provides a text input box and an OK button and returns the text that is entered. For yours I think you need to create your own custom dialog box.
Well you cant build an actual dialog box since those are created by the browser (which is why they look different depending on which browser you are running). So what you can do is to build something into your web page that achieves the same result.

This web page help you create a desired modal dialog box;

http://download.oracle.com/javase/tutorial/uiswing/components/dialog.html#button[^]
 
Share this answer
 
v2
Thanks for your reply. But can you help me to do in Asp.Net 2.0. I think this is based on java.
 
Share this answer
 
Comments
Orcun Iyigun 22-Feb-11 22:07pm    
you cant use MessageBox.Show() on asp.net it will appear on server but wont appear on client, so have a look at clientside messagebox.(To do that you need to use javascript, use alert()) so make a combination of my answer and the stuff you found out about clientside messagebox. Here is a link to get you stared;

http://imar.spaanjaars.com/355/how-do-i-add-a-client-side-message-box-to-aspx-pages

type google clientside messagebox asp.net you will find more details.
angsumakal 22-Feb-11 22:21pm    
Thanks!. Already i used the alert() and the dialog box is displaying properly with ok button. But in the dialog box. With Ok button, i need another button named something.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900