473,320 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

generate dynamic textbox

56
hello everyone,
I have a problem with dynamically generating textbox.I have one link button .i want that when i click on link button then text box is created.when i click next time it will generate second textbox.then third,forth....

also i have another fields on that page.

company name;
card type:
card Name:
pin:

i want this for pin field.

also that if i generate 4 textbox for pin then when i insert the record it will insert for record depend on 4 pin added in pin textboxs.but the company,card type,card name all this field are same for this four record.

can anyone has solution for this problem .

thanks in advance.
Jan 7 '08 #1
8 2621
Hello Sejal,

First of all i will ask that are you asking it for web application or windows application?

And kindly write about the language in which you are developing, so that user can answer accordingly...

Paresh

hello everyone,
I have a problem with dynamically generating textbox.I have one link button .i want that when i click on link button then text box is created.when i click next time it will generate second textbox.then third,forth....

also i have another fields on that page.

company name;
card type:
card Name:
pin:

i want this for pin field.

also that if i generate 4 textbox for pin then when i insert the record it will insert for record depend on 4 pin added in pin textboxs.but the company,card type,card name all this field are same for this four record.

can anyone has solution for this problem .

thanks in advance.
Jan 7 '08 #2
dip_developer
648 Expert 512MB
hello everyone,
I have a problem with dynamically generating textbox.I have one link button .i want that when i click on link button then text box is created.when i click next time it will generate second textbox.then third,forth....

also i have another fields on that page.

company name;
card type:
card Name:
pin:

i want this for pin field.

also that if i generate 4 textbox for pin then when i insert the record it will insert for record depend on 4 pin added in pin textboxs.but the company,card type,card name all this field are same for this four record.

can anyone has solution for this problem .

thanks in advance.
creating dynamic textbox is easy.....on linkbutton's click event just write

Expand|Select|Wrap|Line Numbers
  1.  Dim tb As TextBox 
  2. tb=new Textbox
  3.  
in code you have to set the appropriate location for the textbox...

Expand|Select|Wrap|Line Numbers
  1.  tb.Location=new Point(x,y)
the scond portion of your code requires some learning.....please learn about Database design......if a single company name/card type/card Name entry has 4 pin then you should maintain a second table for pin only.........

lastly but most importantly.................
please obey the posting guidelines..
you have not mention your Database/Language/Project type.....
Jan 7 '08 #3
sejal17
56
Hello Sejal,

First of all i will ask that are you asking it for web application or windows application?

And kindly write about the language in which you are developing, so that user can answer accordingly...

Paresh
Hello Paresh

I want it in asp.net with language C#.

Thnks in advance
Jan 7 '08 #4
Frinavale
9,735 Expert Mod 8TB
Hello Paresh

I want it in asp.net with language C#.

Thnks in advance
I'm currently working on an article explaining how to use dynamic controls in ASP.NET. The example in the article is in VB.NET but I think you can get the general idea of how to make it work in C# from it.

Please note that the article is still in rough draft stages.

The article on Using Dynamic Controls in Asp.NET.

-Frinny
Jan 7 '08 #5
Can you please tell us about the problem you are facing???
Or you have no idea about the thing...

You can add the control to web form by:

TextBox txt = new TextBox();
this.form1.Controls.Add(txt);

You can add custom styles also to the above mentioned txt.
If you are having still problem, kindly contact me at <snipped> with screen shots your application, i will definitely solve it...

Paresh

Hello Sejal,

First of all i will ask that are you asking it for web application or windows application?

And kindly write about the language in which you are developing, so that user can answer accordingly...

Paresh
Jan 8 '08 #6
sejal17
56
Can you please tell us about the problem you are facing???
Or you have no idea about the thing...

You can add the control to web form by:

TextBox txt = new TextBox();
this.form1.Controls.Add(txt);

You can add custom styles also to the above mentioned txt.
If you are having still problem, kindly contact me at <snipped> with screen shots your application, i will definitely solve it...

Paresh



hello everyone,

I have a problem with dynamically generating textbox.I have one link button .i want that when i click on link button then text box is created.when i click next time it will generate second textbox.then third,forth....

also i have another fields on that page.

company name;
card type:
card Name:
pin:

i want this for pin field.

also that if i generate 4 textbox for pin then when i insert the record it will insert for record depend on 4 pin added in pin textboxs.but the company,card type,card name all this field are same for this four record.

I want it for asp.net with language c#.

can anyone has solution for this problem .

thanks in advance.
Jan 9 '08 #7
Frinavale
9,735 Expert Mod 8TB
hello everyone,

I have a problem with dynamically generating textbox.I have one link button .i want that when i click on link button then text box is created.when i click next time it will generate second textbox.then third,forth....

also i have another fields on that page.

company name;
card type:
card Name:
pin:

i want this for pin field.

also that if i generate 4 textbox for pin then when i insert the record it will insert for record depend on 4 pin added in pin textboxs.but the company,card type,card name all this field are same for this four record.

I want it for asp.net with language c#.

can anyone has solution for this problem .

thanks in advance.
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

-Moderator Frinny
Jan 9 '08 #8
dip_developer
648 Expert 512MB
hello everyone,

I have a problem with dynamically generating textbox.I have one link button .i want that when i click on link button then text box is created.when i click next time it will generate second textbox.then third,forth....

also i have another fields on that page.

company name;
card type:
card Name:
pin:

i want this for pin field.

also that if i generate 4 textbox for pin then when i insert the record it will insert for record depend on 4 pin added in pin textboxs.but the company,card type,card name all this field are same for this four record.

I want it for asp.net with language c#.

can anyone has solution for this problem .

thanks in advance.
i have already given you the code.....the one line i missed is as follows......
Expand|Select|Wrap|Line Numbers
  1.  
  2. // Add control to the forms control collection after generating it
  3. // dynamically
  4. Me.Controls.Add(tb)
please dont post your question twice........

Coding in C# is not a hard task to do.....please learn the syntax...it has minimal difference with VB.NET.......you should be familiar with both the language......its for your betterment.....
Jan 10 '08 #9

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

Similar topics

3
by: Guy Harwood | last post by:
Hi, I have designed a textbox that inherits from the System.Windows.Forms.Textbox control. when the control is readonly the back color changes to a light blue to indicate that it is frozen. ...
2
by: Stephen Tang | last post by:
Hi, I'm relatively new at this language, so I've been trying to find parallels to problems I've run into in the past. This is the hypothetical problem: I want to write a CD inventory...
6
by: hb | last post by:
Hi, I have a page bill.aspx and its code-behind bill.aspx.cs. On bill.aspx I have: === Select a month: <asp:dropdownlist runat="server" id="lstDate" autopostback="True" /> <br> <asp:table...
7
by: Abraham Luna | last post by:
how do i stop the dynamic validators from breaking explorer if i use a dynamic validator and move to a different control it breaks explorer and i can type in the page when i'm not supposed to....
1
by: aekta | last post by:
Hello all, How we get The Value of Dynamic generate TextBox in asp.net? i have a web form and in which i want to create textbox dynamically by click on Button ...Now,on another button click I...
4
Frinavale
by: Frinavale | last post by:
Introduction Sometimes, when developing web applications, we need to be able to dynamically load controls based on user selections. The following article describes a simple scenario where TextBox...
1
by: MaryamSh | last post by:
Hi, I am creating a Dynamic Search in my application. I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove) By pressing Add button...
0
by: MaryamSh | last post by:
Create Dynamic Dropdownlist Controls and related event -------------------------------------------------------------------------------- Hi, I am creating a Dynamic Search in my application. I...
4
by: =?Utf-8?B?RHlsYW5TbWl0aA==?= | last post by:
I have a WebForm where I'm dynamically creating some controls and I'm having difficulty understanding how the state is being persisted and how to work with it. I've created a simplified example...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.