codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Looping Issue...Please help!  project2501 at 15:02 on Thursday, May 11, 2006
 

Hello all,

I am new to this forum and am seeking advice. I have a drop down list called ddlDay, a list called ddlMonth, and a list called ddlTotTime. What I want to do is for every commong day in the list I want to take the value from ddlTotTime and past it into the proper day in a calendar. Everything is working but the output does not clear the stuff previously entered into the array.

meaning: day 1 has some values, day 2 has day1's values and day 2's values.

What I want: Day 1 has day 1's values. Day 2 has day 2's values...ect.

The code is pasted below for the CalMain_DayRender function. I would very much appreciate your input!

Thanks,

Codin


Private Sub calMain_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles calMain.DayRender

Dim d As CalendarDay
Dim c As TableCell
d = e.Day
c = e.Cell
Dim previous
Dim count

Dim i = 0
While i < ddlDay.Items.Count
Dim x = 0
Dim temp As String
Dim cell(10)
Dim The_Combo
Dim s = 0
Dim j = 0
While x < ddlDay.Items.Count
If (ddlDay.Items(i).ToString = ddlDay.Items(x).ToString) And (i <> x) Then

temp = "<br>" & ddlTotTime.Items(x).ToString & "<br>"
cell(i) = temp
While s < cell.Length
The_Combo = The_Combo & cell(s)
Entered_Stuff(ddlMonth.Items(x).ToString, ddlDay.Items(x).ToString) = The_Combo
s = s + 1
End While
End If
x = x + 1
End While
i = i + 1
End While


'Make a combination of month and year depending on selected date and display in cell


If d.IsOtherMonth Then
c.Controls.Clear()
Else
Dim hol As String = Entered_Stuff(d.Date.Month, d.Date.Day)
If hol <> "" Then
c.Controls.Add(New LiteralControl("<br>" + hol))
End If
End If

'Now set the week totals
Set_Week_Totals()

End Sub








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Nested Frames problem in Netscape 7
•  Pop up windows
•  Date validation
•  difference between activex dll and an exe
•  Files & Stream
•  loading is taking more time
•  installing perl modules quietly
•  Declare VC++ dll in VB
•  Re: how to test user input radio button after submit and back button


Recent Articles
What is a pointer in C?
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net


© Copyright codetoad.com 2001-2006