By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 1,837 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

Dynamic Checkbox

P: n/a
I am having a problem about the dynamic checkbox
Private Sub Page_Load
Me.NumberOfChkControls = 0
Dim cbCheckBox As New CheckBox
cbCheckBox.Text = .Id.ToString
cbCheckBox.ID = "ControlID_" + NumberOfChkControls.ToString
NumberOfChkControls = NumberOfChkControls + 1
cbCheckBox.EnableViewState = True
dimNewTableCell.Controls.Add(cbCheckBox)
dimNewTableRow.Cells.Add(dimNewTableCell)
End Sub

Property NumberOfChkControls() As Integer
Get
Return viewstate("NumChkcontrls")
End Get
Set(ByVal Value As Integer)
viewstate("NumChkcontrls") = Value
End Set
End Property
This is just a simply of my current source code
and there should have a for loop to generate a lot of checkbox
according how about record in the database
when user select checkbox and press button,basically it work well in
the WinXP platform.
but when i put it to windows Server 2003, it either will select the
wrong record to manipulate or doesnt work at all
can somebody help me?

Jun 21 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Jun 21, 12:43 pm, Raymond <kbt...@gmail.comwrote:
I am having a problem about the dynamic checkbox
Private Sub Page_Load
Me.NumberOfChkControls = 0
Dim cbCheckBox As New CheckBox
cbCheckBox.Text = .Id.ToString
cbCheckBox.ID = "ControlID_" + NumberOfChkControls.ToString
NumberOfChkControls = NumberOfChkControls + 1
cbCheckBox.EnableViewState = True
dimNewTableCell.Controls.Add(cbCheckBox)
dimNewTableRow.Cells.Add(dimNewTableCell)
End Sub

Property NumberOfChkControls() As Integer
Get
Return viewstate("NumChkcontrls")
End Get
Set(ByVal Value As Integer)
viewstate("NumChkcontrls") = Value
End Set
End Property

This is just a simply of my current source code
and there should have a for loop to generate a lot of checkbox
according how about record in the database
when user select checkbox and press button,basically it work well in
the WinXP platform.
but when i put it to windows Server 2003, it either will select the
wrong record to manipulate or doesnt work at all
can somebody help me?
Do you have the same ASP.NET version installed on a both servers?

Jun 21 '07 #2

P: n/a
On Jun 21, 8:17 pm, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Jun 21, 12:43 pm, Raymond <kbt...@gmail.comwrote:


I am having a problem about the dynamic checkbox
Private Sub Page_Load
Me.NumberOfChkControls = 0
Dim cbCheckBox As New CheckBox
cbCheckBox.Text = .Id.ToString
cbCheckBox.ID = "ControlID_" + NumberOfChkControls.ToString
NumberOfChkControls = NumberOfChkControls + 1
cbCheckBox.EnableViewState = True
dimNewTableCell.Controls.Add(cbCheckBox)
dimNewTableRow.Cells.Add(dimNewTableCell)
End Sub
Property NumberOfChkControls() As Integer
Get
Return viewstate("NumChkcontrls")
End Get
Set(ByVal Value As Integer)
viewstate("NumChkcontrls") = Value
End Set
End Property
This is just a simply of my current source code
and there should have a for loop to generate a lot of checkbox
according how about record in the database
when user select checkbox and press button,basically it work well in
the WinXP platform.
but when i put it to windows Server 2003, it either will select the
wrong record to manipulate or doesnt work at all
can somebody help me?

Do you have the same ASP.NET version installed on a both servers?
I install the same .net framework for both servers.
Please help. I stuck on this issues for a few weeks.

Jun 22 '07 #3

P: n/a
On Jun 21, 8:17 pm, Alexey Smirnov <alexey.smir...@gmail.comwrote:
On Jun 21, 12:43 pm, Raymond <kbt...@gmail.comwrote:


I am having a problem about the dynamic checkbox
Private Sub Page_Load
Me.NumberOfChkControls = 0
Dim cbCheckBox As New CheckBox
cbCheckBox.Text = .Id.ToString
cbCheckBox.ID = "ControlID_" + NumberOfChkControls.ToString
NumberOfChkControls = NumberOfChkControls + 1
cbCheckBox.EnableViewState = True
dimNewTableCell.Controls.Add(cbCheckBox)
dimNewTableRow.Cells.Add(dimNewTableCell)
End Sub
Property NumberOfChkControls() As Integer
Get
Return viewstate("NumChkcontrls")
End Get
Set(ByVal Value As Integer)
viewstate("NumChkcontrls") = Value
End Set
End Property
This is just a simply of my current source code
and there should have a for loop to generate a lot of checkbox
according how about record in the database
when user select checkbox and press button,basically it work well in
the WinXP platform.
but when i put it to windows Server 2003, it either will select the
wrong record to manipulate or doesnt work at all
can somebody help me?

Do you have the same ASP.NET version installed on a both servers?
I installed the same .Net framework for the both Server.
Previous when it cant pass the value during re-created the dynamic
checkbox.
please help...

Jun 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.