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. Web Development
  3. ASP.NET
  4. imagebutton

imagebutton

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
6 Posts 5 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.
  • M Offline
    M Offline
    mylogics
    wrote on last edited by
    #1

    hii m using image button in adatalist.I want that when user clicks on this button a new window gets opened with a big size of image.I have tried using this:

    the image gets opened but i want it to open in new window. how can i open the image in new window plz guide. thanks in advanc.

    D A A F 4 Replies Last reply
    0
    • M mylogics

      hii m using image button in adatalist.I want that when user clicks on this button a new window gets opened with a big size of image.I have tried using this:

      the image gets opened but i want it to open in new window. how can i open the image in new window plz guide. thanks in advanc.

      D Offline
      D Offline
      Dinesh Mani
      wrote on last edited by
      #2

      Use a asp:HyperLink and set the image url and set the target attribute to _blank to open in a new window! Check this[^] for details

      1 Reply Last reply
      0
      • M mylogics

        hii m using image button in adatalist.I want that when user clicks on this button a new window gets opened with a big size of image.I have tried using this:

        the image gets opened but i want it to open in new window. how can i open the image in new window plz guide. thanks in advanc.

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        Just use

        window.open

        in OnClientClick of the Imagebutton to invoke the javascript new window. Just place the id of the image in querystring, so that when the server is called, the proper image to be shown in the window. ;)

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Simplify Code Using NDepend
        Basics of Bing Search API using .NET
        Microsoft Bing MAP using Javascript

        M 1 Reply Last reply
        0
        • M mylogics

          hii m using image button in adatalist.I want that when user clicks on this button a new window gets opened with a big size of image.I have tried using this:

          the image gets opened but i want it to open in new window. how can i open the image in new window plz guide. thanks in advanc.

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          I am also agree with Abhishek, Use Window.Open(). Avoid unnecessary Postback ! :) .

          Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

          1 Reply Last reply
          0
          • A Abhishek Sur

            Just use

            window.open

            in OnClientClick of the Imagebutton to invoke the javascript new window. Just place the id of the image in querystring, so that when the server is called, the proper image to be shown in the window. ;)

            Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


            My Latest Articles-->** Simplify Code Using NDepend
            Basics of Bing Search API using .NET
            Microsoft Bing MAP using Javascript

            M Offline
            M Offline
            mylogics
            wrote on last edited by
            #5

            thanks sir.....

            1 Reply Last reply
            0
            • M mylogics

              hii m using image button in adatalist.I want that when user clicks on this button a new window gets opened with a big size of image.I have tried using this:

              the image gets opened but i want it to open in new window. how can i open the image in new window plz guide. thanks in advanc.

              F Offline
              F Offline
              farogh haider
              wrote on last edited by
              #6

              Hi, Call this script. javascript:openPopup('ImageEnlarge.aspx?productid=<%#eval("productid") %>') function openPopup(strOpen) { open(strOpen, "Info", "status=1, width=350, height=338, top=0, left=300, scrollbars=no"); } I hope this will help you

              Farogh Haider Web developer

              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