Solved

Launching URL from code of ASP.NET application

Posted on 2004-10-22
122 Views
Last Modified: 2010-04-05
Hello,

I have a button in an ASP.NET application (Delphi 8). When that button is pressed, I want a new window to appear which is directed to a specific website.

Does anyone know how I can code it?

Thanks!

Regards,
Jay
0
Question by:jaygan
    1 Comment
     
    LVL 22

    Accepted Solution

    by:
    Hello

      There's no way to do that with Asp.net, you need to use JavaScript for that

    Here's a sample

    procedure TWebForm1.Button1_Click(sender: System.Object; e: System.EventArgs);
    var
      S : string;
    begin
      S := '<script language=javascript> ';
      S := S + 'window.open(''www.google.com'') </script>';
      Response.Write(S);
    end;

    HTH

    Regards,
    Mohammed Nasman
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
    In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    856 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now