473,700 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

dynamically creating textboxes based on sql records

Is there a recommended way to have a form that is a list of textboxes from
a sql table based on a username that then puts the captured data back into
the db?

I have a table |userid|skill|l evel|. I need to display the list to the
user, have them update the level and then store this data back into the
table. I can't seem to create the textboxes as asp controls with a unique
id based on the text in the skill field.(to enable me to put the data back
into the database)

thanks for any help or pointers

tony
Nov 18 '05 #1
10 1902
Tony,

Why not to use datagrid? You can make template columns containing textboxes.

Eliyahu

"Tony" <tony@Wright_no spam_one.co.uk> wrote in message
news:pan.2004.0 6.26.08.39.17.6 09079@Wright_no spam_one.co.uk. ..
Is there a recommended way to have a form that is a list of textboxes from
a sql table based on a username that then puts the captured data back into
the db?

I have a table |userid|skill|l evel|. I need to display the list to the
user, have them update the level and then store this data back into the
table. I can't seem to create the textboxes as asp controls with a unique
id based on the text in the skill field.(to enable me to put the data back
into the database)

thanks for any help or pointers

tony

Nov 18 '05 #2
On Sun, 27 Jun 2004 11:27:55 +0200, Eliyahu Goldin wrote:
Tony,

Why not to use datagrid? You can make template columns containing
textboxes.

Eliyahu


Hi, can you tell me where to find a good tutorial on templates? I have had
a look at a few but nothing for the beginner. Do any show how to access
the textbox on a post back when the id is not known(Created dynamically)?

Thanks

Tony
Nov 18 '05 #3
Tony,

I don't know much about tutorials, sorry. As to id, it is known. Look at
UniqueId property. It is made specially for your purposes.

Eliyahu

"Tony" <tony@Wright_no spam_one.co.uk> wrote in message
news:pan.2004.0 6.27.09.10.57.7 06667@Wright_no spam_one.co.uk. ..
On Sun, 27 Jun 2004 11:27:55 +0200, Eliyahu Goldin wrote:
Tony,

Why not to use datagrid? You can make template columns containing
textboxes.

Eliyahu


Hi, can you tell me where to find a good tutorial on templates? I have had
a look at a few but nothing for the beginner. Do any show how to access
the textbox on a post back when the id is not known(Created dynamically)?

Thanks

Tony

Nov 18 '05 #4
Tony,

Why not to use datagrid? You can make template columns containing textboxes.

Eliyahu

"Tony" <tony@Wright_no spam_one.co.uk> wrote in message
news:pan.2004.0 6.26.08.39.17.6 09079@Wright_no spam_one.co.uk. ..
Is there a recommended way to have a form that is a list of textboxes from
a sql table based on a username that then puts the captured data back into
the db?

I have a table |userid|skill|l evel|. I need to display the list to the
user, have them update the level and then store this data back into the
table. I can't seem to create the textboxes as asp controls with a unique
id based on the text in the skill field.(to enable me to put the data back
into the database)

thanks for any help or pointers

tony

Nov 18 '05 #5
On Sun, 27 Jun 2004 11:27:55 +0200, Eliyahu Goldin wrote:
Tony,

Why not to use datagrid? You can make template columns containing
textboxes.

Eliyahu


Hi, can you tell me where to find a good tutorial on templates? I have had
a look at a few but nothing for the beginner. Do any show how to access
the textbox on a post back when the id is not known(Created dynamically)?

Thanks

Tony
Nov 18 '05 #6
Tony,

I don't know much about tutorials, sorry. As to id, it is known. Look at
UniqueId property. It is made specially for your purposes.

Eliyahu

"Tony" <tony@Wright_no spam_one.co.uk> wrote in message
news:pan.2004.0 6.27.09.10.57.7 06667@Wright_no spam_one.co.uk. ..
On Sun, 27 Jun 2004 11:27:55 +0200, Eliyahu Goldin wrote:
Tony,

Why not to use datagrid? You can make template columns containing
textboxes.

Eliyahu


Hi, can you tell me where to find a good tutorial on templates? I have had
a look at a few but nothing for the beginner. Do any show how to access
the textbox on a post back when the id is not known(Created dynamically)?

Thanks

Tony

Nov 18 '05 #7
On Sun, 27 Jun 2004 10:10:58 +0100, Tony
<tony@Wright_no spam_one.co.uk> wrote:
On Sun, 27 Jun 2004 11:27:55 +0200, Eliyahu Goldin wrote:
Tony,

Why not to use datagrid? You can make template columns containing
textboxes.

Eliyahu


Hi, can you tell me where to find a good tutorial on templates? I have had
a look at a few but nothing for the beginner. Do any show how to access
the textbox on a post back when the id is not known(Created dynamically)?


Think again about the "not known" comment. Something had to be used to
determine which text boxes were to be created. That same code should
be used again to get the text boxes and their contents.

Nov 18 '05 #8
Tony.... You just need to persist the primary key for the row "in" the
HTML
page. So first you must get the primary key for the row and then you
must
decided how to "persist" the value into the page (using viewstate,
session,
hidden field). If the primary key is the person's name you could have
problems if two people have the same name. If this is confusing, you
could
read up on the terms candidate key, primary key, simple key and compound
key.

Regards,
Jeff
I can't seem to create the textboxes as asp controls with a unique

id based on the text in the skill field.(to enable me to put the data
back
into the database)<
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #9
On Sun, 27 Jun 2004 10:10:58 +0100, Tony
<tony@Wright_no spam_one.co.uk> wrote:
On Sun, 27 Jun 2004 11:27:55 +0200, Eliyahu Goldin wrote:
Tony,

Why not to use datagrid? You can make template columns containing
textboxes.

Eliyahu


Hi, can you tell me where to find a good tutorial on templates? I have had
a look at a few but nothing for the beginner. Do any show how to access
the textbox on a post back when the id is not known(Created dynamically)?


Think again about the "not known" comment. Something had to be used to
determine which text boxes were to be created. That same code should
be used again to get the text boxes and their contents.

Nov 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
565
by: Bhavin | last post by:
Anybody quickly replies it, would be a great help! I try to create dynamic array of textboxes control in ASP.NET(C#). I got the following error while I tried to assign value to ID property of dynamically created textbox. (look at my code please ) Error: “ Object reference is not set to an instance of Object” totalRows – int variable which varies with number of records in SQL table
2
10086
by: Briand | last post by:
In my previous posting I failed miserably, to give enough information to get my difficulty apparent. So to start again. I want to create textboxes dynamically in VB.NET. This is not a web application that I'm trying to build. I should add that i am a very new user to VB.NET and as such am very ignorant so please excuse this. Many thanks for any assistance. regards
2
2909
by: Chad | last post by:
I have a problem that I am desperate to understand. It involves dynamically adding controls to a Table control that is built as a result of performing a database query. I am not looking to avoid the problem by avoiding the table control or resorting to databound controls that better manage state for me. I hope to understand how to solve the problem by using the Table web control and sticking to the approach of building the table at run...
3
1237
by: SD | last post by:
Hello, I have a form that has a panel container where I'm adding textboxes dynamically based on a query to database, so I'm looping through the records. The problem I have is that once built, I need to pass those textboxes values to another for to build the parameters for a report. Here is the sample:
3
2541
by: Dotnet Gruven | last post by:
I've built a WebForm with a Table added dynamically in Page_Load when IsPostBack is false. The table includes a couple of TextBoxes, RadioButtonLists and CheckboxLists. On postback, those controls are not present nor their valves in Request.Form.AllKeys.
9
7038
by: netasp | last post by:
hi all, how can I populate one aspx form when page is loading based on page ID? for example: loading page A (to search for VB code) would display labels and texboxes, dropdown lists all related to VB, plus the address bar would show something like this: www.somethinghere?id=3 and if you change number 3 from the address bar to (for example) 34 or 71 you would get different page with the same formatting like I.e: www.somethinghere?id=34...
1
3132
by: lanmou | last post by:
hi, Iam working on an application where the user gives the fields they want in a particaular clients records.(this is a form where there are textboxes where they enter the field names and data type and also checkboxes where they check the predifined fields with datatypes.)these fields are stored in a MSaccess table and there is another table which stores the answers to this table. Now what i want to do is, when they enter a button they should...
6
1494
by: Bjorn Sagbakken | last post by:
Hello In VS2005: I am adding buttons and textboxes dynamically into a table, that also dynamically expands. So far, so good, actually very nice. But I am having trouble starting the desired subroutine on postback. To me it seems like the button click event looks for a client script instead of going to the aspx codepage and execute the sub there. The same thing happens with textboxes, where I programatically add
2
1848
by: osakthivel | last post by:
hello sir, I have one problem.I want to createtexboxes dynamically using javascript when textbox onblur event.after creating textboxes if i submit the form the dynamically created textboxes not visible.anybody help me to solve this problem.......
0
9214
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9074
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7807
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5902
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4656
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2392
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2027
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.