thered Posts 1
|
Hello, Ken
Some errors ocurred in the script of this part in chapter 5. First, in the following script (in bold):
If Not IsPostBack Then Dim arrlGames As New ArrayList arrlGames.Add("Scrabble") arrlGames.Add("Crosswords") arrlGames.Add("Wonderwords") arrlGames.Add("Sudoku") arrlGames.Sort() CheckBoxList!.DataSource = arrlGames CheckBoxList!.DataBind() End If
I think the correct script is:
If Not IsPostBack Then Dim arrlGames As New ArrayList arrlGames.Add("Scrabble") arrlGames.Add("Crosswords") arrlGames.Add("Wonderwords") arrlGames.Add("Sudoku") arrlGames.Sort() CheckBoxList1.DataSource = arrlGames CheckBoxList1.DataBind() End If
Also, a script error was found in the script of the button.
Dim strSel As String = " " For Each chbx As ListItem In CheckBoxList1.Items If chbx.Selected Then strSel = srtSel & chbx.Text & "<br/>" End If Next Label1.Text = strSel
According to the program, the error is in the 4th line: strSel = srtSel & chbx.Text & "<br/>", concerning about the srtSel. The message in visual basic is that wam not declared.
Could you check, please what is going on?
My book version is the Portuguese Version. The scripts I mentioned are on page 68.
Thanks
Christian edited by thered on 1/15/2010
|