How to Create textboxs using JavaScript and pass value to asp.net/c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ganesh22
    Banned
    New Member
    • Sep 2007
    • 81

    How to Create textboxs using JavaScript and pass value to asp.net/c#

    Hi,
    How to Create textboxs using JavaScript in asp.net/c# and how to assign that values to a string?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    So your real question is how to create textboxes in javascript?
    I will move it to the javascript forum then.
    MODERATOR

    Comment

    • ganesh22
      Banned
      New Member
      • Sep 2007
      • 81

      #3
      How can i get javascript value into asp.net

      Hi,
      Iam creating Dynamic textboxs using javascript in asp.net. now i want to get that textboxs value in a string. How can i get that one?

      My code:
      [HTML] <script language="javas cript">
      var i=0;
      function changeIt()
      {
      if(i<5)
      {
      i =i+1;
      my_div.innerHTM L = my_div.innerHTM L +"<input type='text' name='Skill'+ i>&nbsp;"
      }
      else
      {
      }
      }
      </script>

      <div id="my_div">
      &nbsp;<input id="Text1" type="text" /><a id="addSkills" href="javascrip t:changeIt();" >Add More...</a> </div>[/HTML]
      Last edited by gits; Jul 23 '08, 02:27 PM. Reason: added code tags

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        could you explain your requirement in more detail ... i just don't get it?

        kind regards

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          document.create Element("input" ) will create an input element to which you can set the attributes using the properties or setAttribute.

          Comment

          Working...