Click here to Skip to main content
15,885,944 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have added
system.windows.forms; reference in asp.net
but some times focus is not coming on Message box
it is staying on my web page only how to control that
C#
MessageBox.Show("This is msgbox", "msg", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);

DefaultDesktopOnly indicate current working desktop
and can some one suggest IIS setting on xp its showing msgbox but in win7 its not showing
Posted

1 solution

if u r using windows forms messagebox then thats going to happen use javascript's alertbox

HTML
Response.Write(@"<script language='javascript'>alert('this is messagebox .');</script>");



ok there is no such solution u should check this
http://jqueryui.com/dialog/#modal-confirmation[^]
 
Share this answer
 
v2
Comments
Member-515487 11-Dec-12 6:05am    
ya but we can't have own button
like YES and NO or we cant focus on by default on NO
__TR__ 11-Dec-12 6:19am    
You can use jQuery to generate message box with Yes or No buttons.
Check this thread
Yes or No confirm box using jQuery[^]
vinayakJJ 11-Dec-12 6:16am    
check updated solution
Member-515487 11-Dec-12 6:27am    
k

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