Advertisement

07.24.2008 at 05:13PM PDT, ID: 23594229
[x]
Attachment Details

using this inside a messagebox call in asp.net.

Asked by mathieu_cupryk in .NET, Programming for ASP.NET, .NET Framework 2.0

public void MessageBox(System.Web.UI.Page page, string Msg)
        {
            string MsgScript = "<script language='javascript'>alert('" + Msg + "')</script>";
            if (!(page.IsStartupScriptRegistered("MessageScript")))
                page.RegisterStartupScript("MessageScript", MsgScript);
        }

when I try to call it.
 catch (System.Exception ex)
        {
            MessageBox(this, ex.ToString());
        }
        return (DSNew);

I get an error on this parameter
                         ------

C:\SvnWork\InitialPriceReporting\DotNet\InitialPriceReportingService\App_Code\InitialPriceReportingService.cs(1022,15): error CS1502: The best overloaded method match for 'InitialPriceReportingService.MessageBox(System.Web.UI.Page, string)' has some invalid arguments

C:\SvnWork\InitialPriceReporting\DotNet\InitialPriceReportingService\App_Code\InitialPriceReportingService.cs(1022,26): error CS1503: Argument '1': cannot convert from 'InitialPriceReportingService' to 'System.Web.UI.Page'
Start Free Trial
 
 
Loading Advertisement...
 
[+][-]07.24.2008 at 06:16PM PDT, ID: 22085225

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 06:34PM PDT, ID: 22085291

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 07:22PM PDT, ID: 22085482

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.24.2008 at 09:34PM PDT, ID: 22085997

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET, Programming for ASP.NET, .NET Framework 2.0
Sign Up Now!
Solution Provided By: philipjonathan
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628