msgbox

Discussion in 'ASP .Net' started by win, May 23, 2008.

  1. win

    win Guest

    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
     
    win, May 23, 2008
    #1
    1. Advertisements

  2. 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:
    .

    ==================================================
    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.



    --------------------
     
    Steven Cheng [MSFT], May 23, 2008
    #2
    1. Advertisements

  3. win

    win Guest

    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
     
    win, May 23, 2008
    #3
  4. 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:
    .

    ==================================================
    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.
    --------------------
     
    Steven Cheng [MSFT], May 26, 2008
    #4
  5. 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:
    .

    --------------------
     
    Steven Cheng [MSFT], May 28, 2008
    #5
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.