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. input validation

input validation

Scheduled Pinned Locked Moved ASP.NET
javascriptsysadminhelp
8 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.
  • J Offline
    J Offline
    jashimu
    wrote on last edited by
    #1

    Hi all, I am still new to web base programming. I have a redio button list and I am currently setting autopostback to true. But it blink the page, when change optins, I don't want the trip to server when I am not doing anything with the server. I wanted to use javascript to do the work for me. Since I have never used it before having very dificult to use it. Lets Say Yes and No two optins. if user slect No it should do something and same for Yes option. please help.

    G M 2 Replies Last reply
    0
    • J jashimu

      Hi all, I am still new to web base programming. I have a redio button list and I am currently setting autopostback to true. But it blink the page, when change optins, I don't want the trip to server when I am not doing anything with the server. I wanted to use javascript to do the work for me. Since I have never used it before having very dificult to use it. Lets Say Yes and No two optins. if user slect No it should do something and same for Yes option. please help.

      G Offline
      G Offline
      gavindon
      wrote on last edited by
      #2

      you would set autopostback to false. that stops the server trip. Put your "do something" code as follows

      protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
      {
      //do something here
      }

      Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.

      J 1 Reply Last reply
      0
      • G gavindon

        you would set autopostback to false. that stops the server trip. Put your "do something" code as follows

        protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e)
        {
        //do something here
        }

        Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.

        J Offline
        J Offline
        jashimu
        wrote on last edited by
        #3

        I alredy have something like this. but when I change my selection the page blink which I am trying to avoid. Just use javascript to do that so it will not go through server.

        G 1 Reply Last reply
        0
        • J jashimu

          I alredy have something like this. but when I change my selection the page blink which I am trying to avoid. Just use javascript to do that so it will not go through server.

          G Offline
          G Offline
          gavindon
          wrote on last edited by
          #4

          you said you had autopostback set to true. this must be set to false to stop the postback when you select a different button

          Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.

          J P 2 Replies Last reply
          0
          • G gavindon

            you said you had autopostback set to true. this must be set to false to stop the postback when you select a different button

            Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.

            J Offline
            J Offline
            jashimu
            wrote on last edited by
            #5

            If I set autopost back to false then it is not catching the even when I change the selection from yes to No radio button.

            1 Reply Last reply
            0
            • J jashimu

              Hi all, I am still new to web base programming. I have a redio button list and I am currently setting autopostback to true. But it blink the page, when change optins, I don't want the trip to server when I am not doing anything with the server. I wanted to use javascript to do the work for me. Since I have never used it before having very dificult to use it. Lets Say Yes and No two optins. if user slect No it should do something and same for Yes option. please help.

              M Offline
              M Offline
              m dhu
              wrote on last edited by
              #6

              You can use a update panel for partial postback of the page.

              jashimu wrote:

              I wanted to use javascript to do the work for me

              Check the link and change your code according to your requirement. http://weblogs.asp.net/gurusarkar/archive/2010/10/14/get-radiobuttonlist-selectedvalue-in-javascript.aspx[^]

              1 Reply Last reply
              0
              • G gavindon

                you said you had autopostback set to true. this must be set to false to stop the postback when you select a different button

                Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning.

                P Offline
                P Offline
                Prasanta_Prince
                wrote on last edited by
                #7

                In case of Auto postback false selected index change will not fire.

                J 1 Reply Last reply
                0
                • P Prasanta_Prince

                  In case of Auto postback false selected index change will not fire.

                  J Offline
                  J Offline
                  jashimu
                  wrote on last edited by
                  #8

                  this is exactly what is happening. it is not firing the event when I change No to Yes on radio button options All I want is that when the option is changed show two textboxes or not. thanks

                  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