Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. I would like to create a button that allow to open html page.

I would like to create a button that allow to open html page.

Scheduled Pinned Locked Moved C#
questionhtml
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zoltix
    wrote on last edited by
    #1

    Excuse-me for my stupid question, In WebForm, I would like to create a button that allow to open html page.(link with parameter ex: qsdf.asp?Text=tete) in the same browser (and other browser). How can I do that?:confused: -=zoltx=-

    T 1 Reply Last reply
    0
    • Z zoltix

      Excuse-me for my stupid question, In WebForm, I would like to create a button that allow to open html page.(link with parameter ex: qsdf.asp?Text=tete) in the same browser (and other browser). How can I do that?:confused: -=zoltx=-

      T Offline
      T Offline
      TigerNinja_
      wrote on last edited by
      #2

      In your event handler for your Button you can Response.Write your javascript code to load a new window and change the location of your current browser. This gives you a dynamic effect. js references window.open, href.location example: public void OnClickButton1(object sender, EventArgs e){ Response.Write("<javascript>window.open("www.codeproject.com");</javascript> ); } Note: code was written from memory, it is meant only for a guide


      R.Bischoff | C++   .NET, Kommst du mit?

      Z A 2 Replies Last reply
      0
      • T TigerNinja_

        In your event handler for your Button you can Response.Write your javascript code to load a new window and change the location of your current browser. This gives you a dynamic effect. js references window.open, href.location example: public void OnClickButton1(object sender, EventArgs e){ Response.Write("<javascript>window.open("www.codeproject.com");</javascript> ); } Note: code was written from memory, it is meant only for a guide


        R.Bischoff | C++   .NET, Kommst du mit?

        Z Offline
        Z Offline
        zoltix
        wrote on last edited by
        #3

        Sorry I tested and you code don't work, I modify your in this manner Response.Write("window.open(\"www.codeproject.com\"); ")"); but it is not enough.. -=zoltx=-

        1 Reply Last reply
        0
        • T TigerNinja_

          In your event handler for your Button you can Response.Write your javascript code to load a new window and change the location of your current browser. This gives you a dynamic effect. js references window.open, href.location example: public void OnClickButton1(object sender, EventArgs e){ Response.Write("<javascript>window.open("www.codeproject.com");</javascript> ); } Note: code was written from memory, it is meant only for a guide


          R.Bischoff | C++   .NET, Kommst du mit?

          A Offline
          A Offline
          Anonymous
          wrote on last edited by
          #4

          how to do the same with C# as scripting language:confused:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups