Dynamic Checkbox

R

Raymond

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?
 
G

Guest

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?
 
R

Raymond

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.
 
R

Raymond

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top