Click here to Skip to main content
15,922,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,


I am working on an web application and I want to add multiple addresses for the client.
If the user clicks on an icon or a button a new Textbox should appear where I can add his other address and so on.The textbox should also get removed when I click on Remove button.

Please help me.

Thanks in Advance.


Bye
Posted
Updated 6-Jun-11 21:51pm
v2
Comments
Sergey Alexandrovich Kryukov 7-Jun-11 4:23am    
Tag it! Forms, WPF, ASP.NET?!!!!!!!
--SA

hi,


this will help

http://support.microsoft.com/kb/317794[^]

happy coding
 
Share this answer
 
 
Share this answer
 
Comments
Kaira_29 7-Jun-11 5:48am    
Hello,

I am using JQuery for the first time.Can you please tell me how can I generate an event for the followinf control in asp.net

<input type="button" value="Add Button" id="addButton">

Since I need to save the addresses in my database on click of Add Button.
This may help you......
first you need one Panel or use div runat=server, we assume its id is dynemicContent
private void btnAdd_Click(object sender, EventArgs e)
{    
    TextBox t = new TextBox();
    t.Name = "yourName";  // give the different name each and every time
    // set other property here.....
    Button b = new Button();
    b.Name = "yourName"; // give the different name each and every time
    b.Text = "Add";
    // set other property here....
    
    // Register event of button...
    b.Click += new EventHandler(btnAdd_Click);

    this.dynemicContent.Controls.Add(t);
    this.dynemicContent.Controls.Add(b);
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900