Subject: Submit button not fired.
Posted By: r_taduri Post Date: 8/25/2006 6:08:59 AM
Hi all,

   I designed a form with adding table control and then dynamically add textbox controls. here is sample code snipnet.

My problem is when there are 2 textbox controls and enter something in that controls and press enter, submit button fired.

But if only one textbox control is present then if I enter submit button, then it was not fired.

Thanks in advance.

Ram.

Dim paraTable As System.Web.UI.WebControls.Table
Dim aRow As New TableRow
Dim aControlCell As New TableCell
Dim aLabelCell As New TableCell
Dim aValidatorCell As New TableCell
Dim atextbox As New System.Web.UI.WebControls.TextBox
atextbox.Width = System.Web.UI.WebControls.Unit.Point(100)
atextbox.ID = paramName
atextbox.Width = System.Web.UI.WebControls.Unit.Point(100)
atextbox.Visible = True
aControlCell.Controls.Add(atextbox)

Dim label As New System.Web.UI.WebControls.Label
label.Text = "Enter you name"

aLabelCell.Wrap = False
aLabelCell.VerticalAlign = VerticalAlign.Middle
aLabelCell.Controls.Add(label)  'add the label to the cell
aRow.Controls.Add(aLabelCell) 'add the label cell to row
aRow.Controls.Add(aControlCell) 'add the control cell to row
aRow.Controls.Add(aValidatorCell) 'add the validator cell to row
paraTable.Controls.Add(aRow)  'add the row to the table

ParamTable.Rows(0).Cells(0).Controls.Add(paraTable)



Reply By: thenoseknows Reply Date: 8/30/2006 12:51:02 AM
What kind of object is the ParamTable?

Where are your event handlers for the button click events?



Neil Timmerman
Programmer
Veris Consulting

Go to topic 49037

Return to index page 190
Return to index page 189
Return to index page 188
Return to index page 187
Return to index page 186
Return to index page 185
Return to index page 184
Return to index page 183
Return to index page 182
Return to index page 181