opening a pop-up window

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mirainc
    New Member
    • Jul 2008
    • 34

    opening a pop-up window

    Hey all

    i want to open up a pop up window when i select a checkbox in the gridview..

    any suggestions?

    Using VB.NET language..
  • andigwandi
    New Member
    • Aug 2008
    • 1

    #2
    Hi

    If the checkbox is a servercontrol then you can add javascript attributes to it like

    checkbox1.attri butes.add("Onch eckchange", "javascript:fun ction()");

    so everytime you change the textbox this perticular javascript function will fired where you can open a popup window.

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      One way is using a clientside event using attribute add method to the object. Another option, you could use a register client script instead from a serverside event. HTH.

      Comment

      • mirainc
        New Member
        • Jul 2008
        • 34

        #4
        Originally posted by andigwandi
        Hi

        If the checkbox is a servercontrol then you can add javascript attributes to it like

        checkbox1.attri butes.add("Onch eckchange", "javascript:fun ction()");

        so everytime you change the textbox this perticular javascript function will fired where you can open a popup window.
        So does that mean that i cant open up a pop up window at all in Visual Web Developer?

        Comment

        • Curtis Rutland
          Recognized Expert Specialist
          • Apr 2008
          • 3264

          #5
          Visual Web Developer is an IDE, not a language.

          But yes, you must use javascript for a web popup. Always remember that ASP.NET is server side only. The browser doesn't see your code, it sees the result of your code compiled and executed on the server.

          Comment

          • blackshadow29
            New Member
            • Apr 2009
            • 2

            #6
            soultion for Pop-Up screen

            use this code to get a pop up screen after add a webpage to your project.


            Dim sCode As String = "window.open('y ourPageName.asp x', '_blank');"
            Page.ClientScri pt.RegisterStar tupScript(Me.[GetType](), "CallAshx", sCode, True)

            Comment

            Working...