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. New to ASP.net "simple question"

New to ASP.net "simple question"

Scheduled Pinned Locked Moved ASP.NET
csharphtmlasp-nettutorialquestion
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.
  • S Offline
    S Offline
    sindhutiwari
    wrote on last edited by
    #1

    hi, i am having two text boxes on the page.. The user is requested to enter value in the first Tbox and the square of it comes in to the second when the button is clicked ..this button is a html button...what i want to do is that when the user enters the second text box ..i mean focus ... then the output must appear in it without getting post back...the textbox must be a asp textbox not html .. 1. how to call the function 2. and in which event 3. what properties should i change experts please do reply regards sindhu tiwari

    its me sid

    S 1 Reply Last reply
    0
    • S sindhutiwari

      hi, i am having two text boxes on the page.. The user is requested to enter value in the first Tbox and the square of it comes in to the second when the button is clicked ..this button is a html button...what i want to do is that when the user enters the second text box ..i mean focus ... then the output must appear in it without getting post back...the textbox must be a asp textbox not html .. 1. how to call the function 2. and in which event 3. what properties should i change experts please do reply regards sindhu tiwari

      its me sid

      S Offline
      S Offline
      sulabh2020
      wrote on last edited by
      #2

      use input controls of html to do same and onfocus event of the control call javascript to do the same. Hope this is the exact solution for u.

      Hello Forum Always be in touch to help about the topic ASP.NET

      S 1 Reply Last reply
      0
      • S sulabh2020

        use input controls of html to do same and onfocus event of the control call javascript to do the same. Hope this is the exact solution for u.

        Hello Forum Always be in touch to help about the topic ASP.NET

        S Offline
        S Offline
        sindhutiwari
        wrote on last edited by
        #3

        sir i want to use asp.net controls not the html controls i will make my question clear what i want to do is 1. user inputs a number in tb1 (asp.net control not html ctrl) 2. user press tab then 3. the output must appear in tb2 (asp.net control not html ctrl) when the focus comes to tb2 it calls a fuction in java script ..square() * the page must not get post back * controls must be asp.net control plz tell me how to call javascript function n from where should i call that ..? i hope i have made myself clear..sorry for confusing u regards sindhu tiwari

        its me sid

        A N 2 Replies Last reply
        0
        • S sindhutiwari

          sir i want to use asp.net controls not the html controls i will make my question clear what i want to do is 1. user inputs a number in tb1 (asp.net control not html ctrl) 2. user press tab then 3. the output must appear in tb2 (asp.net control not html ctrl) when the focus comes to tb2 it calls a fuction in java script ..square() * the page must not get post back * controls must be asp.net control plz tell me how to call javascript function n from where should i call that ..? i hope i have made myself clear..sorry for confusing u regards sindhu tiwari

          its me sid

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

          sindhutiwari wrote:

          fuction in java script ..square()

          why you calling a java script function for Squre.:confused::confused: if both of your Control are server side then do it in server side. I think you want to calculate the Squre of tb1. So do one thing in client side read the ClientID of the control (Tb1) and calculate the squre of Tb1. and on lostfocus of TB2 Register one ScriptSetupBlock for calling the funciton . Try the steps... Hope you learn a lot for doing this. if any problem ask me !!!! Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

          1 Reply Last reply
          0
          • S sindhutiwari

            sir i want to use asp.net controls not the html controls i will make my question clear what i want to do is 1. user inputs a number in tb1 (asp.net control not html ctrl) 2. user press tab then 3. the output must appear in tb2 (asp.net control not html ctrl) when the focus comes to tb2 it calls a fuction in java script ..square() * the page must not get post back * controls must be asp.net control plz tell me how to call javascript function n from where should i call that ..? i hope i have made myself clear..sorry for confusing u regards sindhu tiwari

            its me sid

            N Offline
            N Offline
            N a v a n e e t h
            wrote on last edited by
            #5

            sindhutiwari wrote:

            plz tell me how to call javascript function n from where should i call that ..?

            Tb1.Attributes.Add("OnBlur","YourJsFunction();");

            call this in page_load. Inside JS function, find the element and put value to the second text box.

            All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

            S 1 Reply Last reply
            0
            • N N a v a n e e t h

              sindhutiwari wrote:

              plz tell me how to call javascript function n from where should i call that ..?

              Tb1.Attributes.Add("OnBlur","YourJsFunction();");

              call this in page_load. Inside JS function, find the element and put value to the second text box.

              All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

              S Offline
              S Offline
              sindhutiwari
              wrote on last edited by
              #6

              SIR would u be some what clear ... n plz suggest me some online books from which i can get a proper step by step learning

              its me sid

              N A 2 Replies Last reply
              0
              • S sindhutiwari

                SIR would u be some what clear ... n plz suggest me some online books from which i can get a proper step by step learning

                its me sid

                N Offline
                N Offline
                N a v a n e e t h
                wrote on last edited by
                #7

                sindhutiwari wrote:

                would u be some what clear

                Attributes.Add adds attribute to the rendered controls. OnBlur is the JS event fired when it lost the focus.

                sindhutiwari wrote:

                n plz suggest me some online books from which i can get a proper step by step learning

                These all are very basic and I don't think that there would be a step by step tutorial for this. You may check this[^] MSDN article or getting some information.

                All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions

                1 Reply Last reply
                0
                • S sindhutiwari

                  SIR would u be some what clear ... n plz suggest me some online books from which i can get a proper step by step learning

                  its me sid

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

                  Hope this will help you Asp.net Client side Interaction [^]

                  Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

                  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