• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 127
  • Last Modified:

Launching URL from code of ASP.NET application

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
jaygan
Asked:
jaygan
1 Solution
 
Mohammed NasmanSoftware DeveloperCommented:
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

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now