Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamic Checkbox

Reply
Thread Tools

Dynamic Checkbox

 
 
Raymond
Guest
Posts: n/a
 
      06-21-2007
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?

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      06-21-2007
On Jun 21, 12:43 pm, Raymond <(E-Mail Removed)> wrote:
> 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?

 
Reply With Quote
 
 
 
 
Raymond
Guest
Posts: n/a
 
      06-22-2007
On Jun 21, 8:17 pm, Alexey Smirnov <(E-Mail Removed)> wrote:
> On Jun 21, 12:43 pm, Raymond <(E-Mail Removed)> wrote:
>
>
>
>
>
>
>
> > 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.

 
Reply With Quote
 
Raymond
Guest
Posts: n/a
 
      06-22-2007
On Jun 21, 8:17 pm, Alexey Smirnov <(E-Mail Removed)> wrote:
> On Jun 21, 12:43 pm, Raymond <(E-Mail Removed)> wrote:
>
>
>
>
>
>
>
> > 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...

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= ASP .Net 1 10-06-2006 04:11 PM
disable checkbox list checkbox Vikram ASP .Net 1 01-25-2006 02:59 PM
Text on Checkbox below the checkbox tshad ASP .Net 0 04-14-2005 11:26 PM
A nested dynamic checkbox inside my dynamic form. pizzy Javascript 5 04-12-2005 02:55 PM
How to have a nested dynamic checkbox inside my dynamic form. pizzy Javascript 0 03-23-2005 03:32 AM



Advertisments