msgbox

W

win

I'm using ASP.Net 2.0

MsgBox("Are you sure to delete?", MsgBoxStyle.Question +
MsgBoxStyle.OkCancel, Page.Title.ToString)

The message box sometimes does not pop up on the top of the screen.
Can I set the message box always on top of the screen?

Thank you
 
S

Steven Cheng [MSFT]

Hi Win,

From your description, you're using MsgBox api in ASP.NET web application
to display some dialog box and want to control position of the dialog,
correct?

As for the "MsgBox" api, would you tell me which control or component are
you using? So far based on my understanding, ASP.NET doesn't provide
built-in support on displaying messagebox since the messagebox is displayed
at client-side browser (generally use javascript to display it). I'm
wondering are you using System.Windows.Forms namespace's class to show to
message box? If this is the case, I'm afraid winform API is not supported
to be used in ASP.NET web application since ASP.NET appliation is
server-side application which is mostly running in a non-interactive
process and the messagebox showed via winform api can not be seen by client
user. The reason you may see it when you use Visual Studio's webtest
server on local machine is because the web test server itself is a winform
application(you can close the browser when the msgbox displayed to verify
this, it is displayed by the webtest server process).

In addition, in ASP.NET we normally use client script to display message
box( alert javascript method). Here are some web articles introducing this:

#Message Box in ASP.NET 2.0
http://www.beansoftware.com/ASP.NET-Tutorials/Message-Box.aspx

#Adding Client-Side Message Boxes in your ASP.NET Web Pages
http://aspnet.4guysfromrolla.com/articles/021104-1.aspx

#ASP.NET Alerts: how to display message boxes from server-side code?
http://weblogs.asp.net/bleroy/archive/2005/12/01/asp-net-alerts-how-to-displ
ay-message-boxes-from-server-side-code.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
 
W

win

Hi Steven

I've created a gridview and it has a delete button on each row.
"<asp:CommandField ShowDeleteButton="True" />".
I want to pop up a messagebox to ask the user Yes/No to ensure to delete the
data instead of directly deleted the record.
Can you help me?

Thanks a lot

Win
 
S

Steven Cheng [MSFT]

Thanks for Mark's input.

Hi Win,

I think Mark has provided some good reference about popup javascript dialog
in web page which can help you display the "confirm deleting" dialog for
gridview. If you have any further specific questions, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
 
S

Steven Cheng [MSFT]

Hi Win,

Do you still have any questions on this? If so, please don't hesitate to
post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

--------------------
Organization: Microsoft
Date: Mon, 26 May 2008 02:14:29 GMT
Subject: Re: msgbox
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top