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. How to Open new aspx page in same window

How to Open new aspx page in same window

Scheduled Pinned Locked Moved ASP.NET
toolstutorial
10 Posts 4 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.
  • S Offline
    S Offline
    Samarjeet Singh india
    wrote on last edited by
    #1

    Hi all, In a registration page there is a dropdown list in which city name is comming form table if a paritcular city is not show in the dropdown then user select other option and when user select other then I want open a citymaster page in which option to add new city. I have written a javescript fuction and calling it but it is open in new window <script> function showAddCityForm() { window.open("Citymaster.aspx") } </script> tell me or hint me how to open page in the same window Thanks in advance.......

    C L A 4 Replies Last reply
    0
    • S Samarjeet Singh india

      Hi all, In a registration page there is a dropdown list in which city name is comming form table if a paritcular city is not show in the dropdown then user select other option and when user select other then I want open a citymaster page in which option to add new city. I have written a javescript fuction and calling it but it is open in new window <script> function showAddCityForm() { window.open("Citymaster.aspx") } </script> tell me or hint me how to open page in the same window Thanks in advance.......

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      The function is CALLED window.open, what did you expect ? Why do you need a method instead of just using a link ? Oh, because it's in response to a dropdown. Use window.location.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      1 Reply Last reply
      0
      • S Samarjeet Singh india

        Hi all, In a registration page there is a dropdown list in which city name is comming form table if a paritcular city is not show in the dropdown then user select other option and when user select other then I want open a citymaster page in which option to add new city. I have written a javescript fuction and calling it but it is open in new window <script> function showAddCityForm() { window.open("Citymaster.aspx") } </script> tell me or hint me how to open page in the same window Thanks in advance.......

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Samarjeet Singh@india wrote:

        how to open page in the same window

        Try using

        <script type="text/javascript">
        function openpopup()
        {
        window.open("b.html",'_self');
        }
        </script>

        Regards Aman Bhullar www.arlivesupport.com[^]

        S 1 Reply Last reply
        0
        • S Samarjeet Singh india

          Hi all, In a registration page there is a dropdown list in which city name is comming form table if a paritcular city is not show in the dropdown then user select other option and when user select other then I want open a citymaster page in which option to add new city. I have written a javescript fuction and calling it but it is open in new window <script> function showAddCityForm() { window.open("Citymaster.aspx") } </script> tell me or hint me how to open page in the same window Thanks in advance.......

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Hi, if u want through the code.

          ClientScript.RegisterStartupScript(Me.GetType(), "ReportWindow", String.Format("<script>window.open('UserSetting.aspx','ReportWindow', 'width=400,height=200,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes');</script>"))

          Thanks, Amit Patel

          S 1 Reply Last reply
          0
          • L Lost User

            Samarjeet Singh@india wrote:

            how to open page in the same window

            Try using

            <script type="text/javascript">
            function openpopup()
            {
            window.open("b.html",'_self');
            }
            </script>

            Regards Aman Bhullar www.arlivesupport.com[^]

            S Offline
            S Offline
            Samarjeet Singh india
            wrote on last edited by
            #5

            Dear, it is open in same window . but i want to open as child page in the same window. if know then suggest me...thnks

            L 1 Reply Last reply
            0
            • S Samarjeet Singh india

              Hi all, In a registration page there is a dropdown list in which city name is comming form table if a paritcular city is not show in the dropdown then user select other option and when user select other then I want open a citymaster page in which option to add new city. I have written a javescript fuction and calling it but it is open in new window <script> function showAddCityForm() { window.open("Citymaster.aspx") } </script> tell me or hint me how to open page in the same window Thanks in advance.......

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

              Rather than using Window.open navigate to the page. Use

              function showAddCityForm()
              {
              window.location.href = "Citymaster.aspx";
              }

              :rose:

              Abhishek Sur


              My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

              **Don't forget to click "Good Answer" if you like to.

              1 Reply Last reply
              0
              • S Samarjeet Singh india

                Dear, it is open in same window . but i want to open as child page in the same window. if know then suggest me...thnks

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Samarjeet Singh@india wrote:

                but i want to open as child page in the same window.

                window.showModalDialog("b.html",'','dialogHeight:140px; dialogWidth:400px ; resizable:no');

                Regards Aman Bhullar www.arlivesupport.com[^]

                A 1 Reply Last reply
                0
                • L Lost User

                  Samarjeet Singh@india wrote:

                  but i want to open as child page in the same window.

                  window.showModalDialog("b.html",'','dialogHeight:140px; dialogWidth:400px ; resizable:no');

                  Regards Aman Bhullar www.arlivesupport.com[^]

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

                  I think it is not available in most of the browsers ... It is IE specific. Not in w3 standard function list. :(

                  Abhishek Sur


                  My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

                  **Don't forget to click "Good Answer" if you like to.

                  L 1 Reply Last reply
                  0
                  • L Lost User

                    Hi, if u want through the code.

                    ClientScript.RegisterStartupScript(Me.GetType(), "ReportWindow", String.Format("<script>window.open('UserSetting.aspx','ReportWindow', 'width=400,height=200,status=no,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes');</script>"))

                    Thanks, Amit Patel

                    S Offline
                    S Offline
                    Samarjeet Singh india
                    wrote on last edited by
                    #9

                    Thnks Dear, It is working Fine. is it is possable to remove child window border ? if yes then tell me

                    1 Reply Last reply
                    0
                    • A Abhishek Sur

                      I think it is not available in most of the browsers ... It is IE specific. Not in w3 standard function list. :(

                      Abhishek Sur


                      My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

                      **Don't forget to click "Good Answer" if you like to.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      I have used this in our project and it works fine in 1. IE(6,7) 2. Firefox(3.5) 3. Opera(9) 4. Google Chrome

                      Regards Aman Bhullar www.arlivesupport.com[^]

                      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