471,080 Members | 1,198 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,080 software developers and data experts.

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

How to Create textboxs using JavaScript in asp.net/c# and how to assign that values to a string?
Jul 22 '08 #1
4 1553
7,872 Expert 4TB
So your real question is how to create textboxes in javascript?
I will move it to the javascript forum then.
Jul 22 '08 #2
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="javascript">
var i=0;
function changeIt()
i =i+1;
my_div.innerHTML = my_div.innerHTML +"<input type='text' name='Skill'+ i>&nbsp;"

<div id="my_div">
&nbsp;<input id="Text1" type="text" /><a id="addSkills" href="javascript:changeIt();" >Add More...</a> </div>[/HTML]
Jul 23 '08 #3
5,390 Expert Mod 4TB
could you explain your requirement in more detail ... i just don't get it?

kind regards
Jul 25 '08 #4
16,027 Expert Mod 8TB
document.createElement("input") will create an input element to which you can set the attributes using the properties or setAttribute.
Jul 29 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

8 posts views Thread by Steve Neill | last post: by
3 posts views Thread by takarimasu | last post: by
1 post views Thread by quickcur | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.