954,168 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How can i add textboxes dynamically in an asp page

Hi there,

Can anyone help me out..

I have a page where in I have a table
(Iits related to the tradein offers to enter one by one)
when the new page is requested, all the rows in the table will be blank
and when i click on the new offrer button, I should be able to add text boxes in the table and do some modifications.

(I know its easy in asp.net, but i am stuck with asp, and my deliverable is coiming nearer)
Is there any way where we can create dynamic text boxes??

Also, when a hyperlink is clicked to get into this page, all the past details stored in the database should be shown in the respective text boxes and ready again for any modifications!


PLS PLS PLs do help me out ..
I know there are a lot of gurus working out there in these issues,
can any one help me???

Thanks in advance

Regards

ss_asp
Newbie Poster
4 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 

I would personally use Javascript to dynamically add new inputs, but if you must use ASP you can either pass parameters via the query string or hidden fields that tell your script to write out new text fields. Ex: the url of the page where the text field is to be written to the page could be ./mypage.asp. You could then set the onclick of a button to "window.location='./mypage.asp?NEWFIELD=Y'". Your script would then to check for a value for NEWFIELD, by using Request.QueryString("NEWFIELD"), and when it ="Y" you would create a new field. Obviusly there are many different ways to go about this, but this is one of them.

jpn311
Newbie Poster
9 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 



1.  
     



radharadha
Newbie Poster
6 posts since May 2006
Reputation Points: 10
Solved Threads: 1
 

Please check your code before posting on the net or atlease explain what you have added.

kuzthinks
Newbie Poster
2 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 
1.        





Please check your code before posting on the net or atlease explain what you have added.

kuzthinks
Newbie Poster
2 posts since Mar 2007
Reputation Points: 10
Solved Threads: 0
 
I would personally use Javascript to dynamically add new inputs, but if you must use ASP you can either pass parameters via the query string or hidden fields that tell your script to write out new text fields. Ex: the url of the page where the text field is to be written to the page could be ./mypage.asp. You could then set the onclick of a button to "window.location='./mypage.asp?NEWFIELD=Y'". Your script would then to check for a value for NEWFIELD, by using Request.QueryString("NEWFIELD"), and when it ="Y" you would create a new field. Obviusly there are many different ways to go about this, but this is one of them.

Dear Sir,
I just wanna know that if we click by the method you described, wont be all other written data vanished???
Awaiting of your quick reply.

sbkhan303
Newbie Poster
1 post since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You