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. stop page reloading in asp.net

stop page reloading in asp.net

Scheduled Pinned Locked Moved ASP.NET
csharpjavaasp-nettoolshelp
8 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.
  • V Offline
    V Offline
    vikas shukla
    wrote on last edited by
    #1

    hi sir, i am new in asp.net.sir i want to know that is there any java script with the help of which we can stop page reloading at the time of using ajax control.and dropdown text selection. sir i know that update panel can do this.but sir i do not want to use update panel.i mean i want to stop my page reload without using update panel while i am using ajax. please help me sir i am posting my this question again. because first time i did not get any response.

    N T R 4 Replies Last reply
    0
    • V vikas shukla

      hi sir, i am new in asp.net.sir i want to know that is there any java script with the help of which we can stop page reloading at the time of using ajax control.and dropdown text selection. sir i know that update panel can do this.but sir i do not want to use update panel.i mean i want to stop my page reload without using update panel while i am using ajax. please help me sir i am posting my this question again. because first time i did not get any response.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Ajax is an out of band technology that does not require your page to reload. There are many, many examples for Ajax here and elsewhere. One thing to make sure to do is set AutoPostback to false on your dropdownlist so it does not postback


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • V vikas shukla

        hi sir, i am new in asp.net.sir i want to know that is there any java script with the help of which we can stop page reloading at the time of using ajax control.and dropdown text selection. sir i know that update panel can do this.but sir i do not want to use update panel.i mean i want to stop my page reload without using update panel while i am using ajax. please help me sir i am posting my this question again. because first time i did not get any response.

        T Offline
        T Offline
        T M Gray
        wrote on last edited by
        #3

        Do you have a reason you don't want to use an update panel? Your question is like asking about getting a nail into a piece of wood but refusing to use a hammer. When you make silly restrictions with no reasons behind them you are less likely to get help because you might dismiss other good solutions for no apparant reason as well.

        N 1 Reply Last reply
        0
        • T T M Gray

          Do you have a reason you don't want to use an update panel? Your question is like asking about getting a nail into a piece of wood but refusing to use a hammer. When you make silly restrictions with no reasons behind them you are less likely to get help because you might dismiss other good solutions for no apparant reason as well.

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #4

          I would disagree. There are plenty of good reasons to not use an UpdatePanel. Refreshing a portion of a page does not require one to be used and it does add extra overhead that may not be necessary.


          I know the language. I've read a book. - _Madmatt

          T 1 Reply Last reply
          0
          • N Not Active

            I would disagree. There are plenty of good reasons to not use an UpdatePanel. Refreshing a portion of a page does not require one to be used and it does add extra overhead that may not be necessary.


            I know the language. I've read a book. - _Madmatt

            T Offline
            T Offline
            T M Gray
            wrote on last edited by
            #5

            Of course. A nail doesn't require a hammer either. You could use a rock. And you can just pick up a rock without the overhead of a mining and smelting operation for the metal part of a hammer. But if I have a hammer and a rock on my work table, I am probably going to use the hammer. And if someone comes into my workshop and declares "no hammers allowed" for no apparant reason I will dismiss them as a nut and tell them to go away. The overhead is usually minimal when compared to the complexity and maintainability issues of most of the alternatives for someone who is new to ASP.Net as the asker stated. But we can let the asker decide. The following article discusses some of the trade-offs and alternate methods. UpdatePanel Tips and Tricks[^]

            1 Reply Last reply
            0
            • V vikas shukla

              hi sir, i am new in asp.net.sir i want to know that is there any java script with the help of which we can stop page reloading at the time of using ajax control.and dropdown text selection. sir i know that update panel can do this.but sir i do not want to use update panel.i mean i want to stop my page reload without using update panel while i am using ajax. please help me sir i am posting my this question again. because first time i did not get any response.

              R Offline
              R Offline
              Rutvik Dave
              wrote on last edited by
              #6

              Ok my friend thats too much use of "Sir" in your post... :-D

              M 1 Reply Last reply
              0
              • V vikas shukla

                hi sir, i am new in asp.net.sir i want to know that is there any java script with the help of which we can stop page reloading at the time of using ajax control.and dropdown text selection. sir i know that update panel can do this.but sir i do not want to use update panel.i mean i want to stop my page reload without using update panel while i am using ajax. please help me sir i am posting my this question again. because first time i did not get any response.

                R Offline
                R Offline
                Rutvik Dave
                wrote on last edited by
                #7

                Lets assume you have a combo box called cmbList and 3 label lblDisplayText, lblDisplayValue, lblSelectedIndex on the page. use the following script to get the value and fill the labels...

                window.onload = function(){
                var list = document.getElementById("cmbList"); // put the name of the combobox control
                list.onchange = function(){
                document.getElementById("lblDisplayText").value = list.options[list.selectedIndex].text;
                document.getElementById("lblDisplayValue").value = list.options[list.selectedIndex].value;
                document.getElementById("lblSelectedIndex").value = list.selectedIndex;
                //window.alert("Selected item is " + list.options[list.selectedIndex].text + " and its option value is " + list.options[list.selectedIndex].value);
                }
                }

                to make sure you can remove commented code.

                1 Reply Last reply
                0
                • R Rutvik Dave

                  Ok my friend thats too much use of "Sir" in your post... :-D

                  M Offline
                  M Offline
                  MyDevBank
                  wrote on last edited by
                  #8

                  :laugh: :laugh: Sir nobody and use Jquery Ajax look at this http://api.jquery.com/jQuery.ajax/[^] or read this http://mydevbank.com/ajax.aspx[^]

                  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