Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2005, 05:16 AM
Authorized User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default automatically generated textboxes

Hi,
I have a form in which i insert date,station_id,production
each station has many distillers like(station A has D1,D2,D3)and the total of the D1,D2,D3 is the prodction of the station.

i have a table named distillers:
----------------------------------

distiller_id,time,production


what i want to do is to let the user see the station form to insert date,station_id and to make a link next to production textbox that opens a new pop up window and this window has:
date(same as inserted in station form,distiller_id ,production)
what i want is to list all the distillers related to this station like in Station A it will show me a form in this way:

date:(as the one entered in stationA form)

D1: , storage:
D2: , storage:
D3: , storage:

and that form will insert the values into distillers table:
date,distiller_id,storage
so each distiller will save the same form date with storage entered,
.

at last in the stationA form i want after submitting the result of the distiller form the window closes and the production field in the stationA form hold or shows the total of the 3 distillers entered through the pop up window.
I know its a bit difficult and confusing but i really need help in that and if i can give more than 500 points ,i will.



 
Old May 3rd, 2005, 06:02 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

I am not very clear with what you said. My answer is from what I understood.

you can pass the date and station_id to the popup window and let the user select the distileers. Once they have done and submit the form, you can pass the total value to the Calling page textbox.

If I am not thinking the way you want, please reply

Regards
Ganesh
 
Old May 4th, 2005, 12:06 AM
Authorized User
 
Join Date: Aug 2004
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

what i want is to have the distllers automatically generated as input textboxes to let the user enter the production storage,like if he chooses station(a),it populates for him all the distillers in this station(d1,d2,d3)then he can insert the data

 
Old May 4th, 2005, 02:21 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

I think you need to show the distillers for each site in a new page (popup). For that you can pass the station ID to the popup and then populate the distillers for the selected station. Then once the user enters the values for the production and submits, sum it up and pass it back to the calling form. You might need to use client side script for this.

Regards
Ganesh
 
Old May 4th, 2005, 06:16 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'd suggest building a datagrid that is bound to a collection (array or other) of distillers. The reason for a datagrid is that the datagrid control is very easy to work with when you need to get data back from a repeating set of controls, in this case a textbox for each item.

-Peter
 
Old May 11th, 2005, 08:10 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default

I think I understand his problem. He wants to create a control array of text boxes to get the input from the user but the text boxes are bounded only to the number of distillers available (means if the total number of distillers are 5, there must be 5 rows to get 5 data for these 5 distillers.

If there is a chance of creating control arrays please post it.



SK
 
Old May 11th, 2005, 09:28 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You could create a placeholder that contains a dynamic list of textboxes. You need to programatically add the textboxes to the placeholder. Something very important is that you need to add the textboxes in the right place in the page lifecycle in order to get the textboxes to maintain their state properly. This can be very tricky and you need to have a very good understanding of the page life cycle to get it to work correctly. This is why I suggest starting with textboxes in a datagrid. The datagrid will handle all the overhead of reconstructing the structure of the controls you place in the column templates. And typically, this type of repeating construct is displayed in a tabular format so you get that as a bonus.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically generated textboxes and their values Frode ASP.NET 2.0 Basics 1 April 17th, 2006 03:46 PM
Two TextBoxes [email protected] ASP.NET 1.0 and 1.1 Basics 5 April 1st, 2006 06:32 AM
textboxes and additions toiletgraffiti C# 4 January 23rd, 2006 11:50 AM
calculate 2 textboxes chriskhan2000 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 December 1st, 2005 09:11 PM
select generated automatically with asp crmpicco Classic ASP Basics 1 July 7th, 2005 04:34 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.