Showing Error in pop-up boxes in Web Forms

Discussion in 'ASP .Net Web Controls' started by Ipsita, Nov 10, 2004.

  1. Ipsita

    Ipsita Guest

    Hi!

    I am working on a ASP.NET webform application. I need to show errors
    on a pop-up window. I want to show some general program related errors
    and not just errors from input validations which can be showed on a
    ValidationSummary control. Please let me know if there is a way to do
    it.

    Thanks
    Ipsita
    Ipsita, Nov 10, 2004
    #1
    1. Advertising

  2. By popup do you mean a modal dialog box, like a JavaScript alert(), or
    do you mean a brand new browser instance?

    In either case, what you'll need to do is inject appropriate client-side
    script into the rendered page. You can learn more about how to
    accomplish this, and what script needs to be injected for these
    different scenarios, at my article:

    Working with Client-Side Script
    http://msdn.microsoft.com/asp.net/u...ibrary/en-us/dnaspp/html/ClientSideScript.asp

    Happy Programming!

    --

    Scott Mitchell

    http://www.4GuysFromRolla.com
    http://www.ASPMessageboard.com
    http://www.ASPFAQs.com

    * When you think ASP, think 4GuysFromRolla.com!
    Scott Mitchell [MVP], Nov 10, 2004
    #2
    1. Advertising

  3. Try something like this:

    private void DisplayMessage(string message)
    {
    RegisterStartupScript("message", "<script language='JavaScript'>alert('" +
    message + "');</script>");
    }

    "Ipsita" wrote:

    > Hi!
    >
    > I am working on a ASP.NET webform application. I need to show errors
    > on a pop-up window. I want to show some general program related errors
    > and not just errors from input validations which can be showed on a
    > ValidationSummary control. Please let me know if there is a way to do
    > it.
    >
    > Thanks
    > Ipsita
    >
    Steven Burton, Nov 17, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3JpbWFkaGk=?=

    coding pop up boxes in ASP.Net

    =?Utf-8?B?U3JpbWFkaGk=?=, Nov 17, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    17,353
    S.M. Altaf [MVP]
    Nov 25, 2005
  2. Darren D'Orlando
    Replies:
    1
    Views:
    719
    Steve C. Orr, MCSD
    Aug 19, 2003
  3. Ipsita
    Replies:
    1
    Views:
    326
    Eliyahu Goldin
    Nov 10, 2004
  4. kevin bailey
    Replies:
    0
    Views:
    389
    kevin bailey
    Aug 15, 2003
  5. Stefan Mueller
    Replies:
    5
    Views:
    12,347
    jamesxa
    Jun 16, 2009
Loading...

Share This Page