Click here to Skip to main content
15,920,513 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Datagridview with scroll bar. Pin
Anurag Gandhi2-Dec-09 19:43
professionalAnurag Gandhi2-Dec-09 19:43 
AnswerRe: Datagridview with scroll bar. Pin
Dinesh Mani2-Dec-09 19:44
Dinesh Mani2-Dec-09 19:44 
AnswerRe: Datagridview with scroll bar. Pin
Abhijit Jana2-Dec-09 19:52
professionalAbhijit Jana2-Dec-09 19:52 
QuestionDynamic Controls... Pin
Illegal Operation2-Dec-09 12:45
Illegal Operation2-Dec-09 12:45 
AnswerRe: Dynamic Controls... Pin
dan!sh 2-Dec-09 15:41
professional dan!sh 2-Dec-09 15:41 
GeneralRe: Dynamic Controls... Pin
Illegal Operation2-Dec-09 15:50
Illegal Operation2-Dec-09 15:50 
GeneralRe: Dynamic Controls... Pin
saini arun2-Dec-09 19:09
saini arun2-Dec-09 19:09 
GeneralRe: Dynamic Controls... Pin
Dinesh Mani2-Dec-09 19:35
Dinesh Mani2-Dec-09 19:35 
Illegal Operation wrote:
private void GenerateTable(int numOfRows)
{
Table tblTimesheet = new Table();
tblTimesheet.ID = "tblTimesheet";
placeHolder.Controls.Add(tblTimesheet);
.
.
.


As per the above lines, the Table tblTimesheet would be added to the place holder as many times as you click the Add row button.

You would need to change the logic to first check if the place holder already has a the desired table and based on availability you have to either create a new instance or get an handle to the existing instance and add rows. To do this you have to set the runat property of the table that you create to "server" so that the table is visible on the server after postback. You would also have to change the logic to add rows based on the above availability check.

Alternately you can clear the control array before you add the new table, but if you decide to do so then you'll have to ensure that you copy the data from the existing table's textboxes to the new table's textboxes.

For the replication logic for the date textbox you can use the logic suggested by arun$aini. In fact it would be advisable to do it for all the controls that you add to the table.

I assume you need to get the data from the textboxes/checkboxes on some submit button click. For that to happen you need to set the runat property of all the dynamically created controls too.
Questionaspx page in iframe reloading issues Pin
robustm2-Dec-09 3:56
robustm2-Dec-09 3:56 
AnswerRe: aspx page in iframe reloading issues Pin
Abhishek Sur2-Dec-09 4:45
professionalAbhishek Sur2-Dec-09 4:45 
GeneralRe: aspx page in iframe reloading issues Pin
robustm2-Dec-09 5:08
robustm2-Dec-09 5:08 
QuestionHow to open URL in new browser window Pin
Nekkantidivya2-Dec-09 1:08
Nekkantidivya2-Dec-09 1:08 
AnswerRe: How to open URL in new browser window Pin
Dinesh Mani2-Dec-09 1:25
Dinesh Mani2-Dec-09 1:25 
AnswerRe: How to open URL in new browser window Pin
sumit70342-Dec-09 1:43
sumit70342-Dec-09 1:43 
AnswerRe: How to open URL in new browser window Pin
Abhishek Sur2-Dec-09 1:48
professionalAbhishek Sur2-Dec-09 1:48 
AnswerRe: How to open URL in new browser window Pin
Gamzun2-Dec-09 3:19
Gamzun2-Dec-09 3:19 
AnswerRe: How to open URL in new browser window Pin
Christopher Duncan2-Dec-09 4:08
Christopher Duncan2-Dec-09 4:08 
QuestionCell Format in excel. [modified] Pin
dayakar_dn2-Dec-09 0:34
dayakar_dn2-Dec-09 0:34 
AnswerRe: Cell Format in excel. Pin
Dinesh Mani2-Dec-09 0:46
Dinesh Mani2-Dec-09 0:46 
AnswerRe: Cell Format in excel. Pin
Abhishek Sur2-Dec-09 3:09
professionalAbhishek Sur2-Dec-09 3:09 
AnswerRe: Cell Format in excel. Pin
Gamzun2-Dec-09 3:20
Gamzun2-Dec-09 3:20 
QuestionThe server rejected one or more recipient addresses. The server response was: 501 5.5.4 Invalid Address Pin
Amit Spadez1-Dec-09 23:43
professionalAmit Spadez1-Dec-09 23:43 
AnswerRe: The server rejected one or more recipient addresses. The server response was: 501 5.5.4 Invalid Address Pin
Abhijit Jana1-Dec-09 23:47
professionalAbhijit Jana1-Dec-09 23:47 
GeneralRe: The server rejected one or more recipient addresses. The server response was: 501 5.5.4 Invalid Address Pin
Amit Spadez1-Dec-09 23:49
professionalAmit Spadez1-Dec-09 23:49 
GeneralRe: The server rejected one or more recipient addresses. The server response was: 501 5.5.4 Invalid Address Pin
Abhijit Jana2-Dec-09 0:01
professionalAbhijit Jana2-Dec-09 0:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.