Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

ASP.net Editing a variable number of items via an API

Hi

I am using the following code to edit two records via an API in ASP.net
I want to change it so that I can add a much larger variable number of edits
Can I use an array for instanceeg Dim DL(10000) as New LineEdit?

                        Dim DLs As New List(Of LineEdit)
                        Dim DL1 As New LineEdit
                        Dim DL2 As New LineEdit
                        DL1.LineID = 2
                        DL1.EmployeeID = 4727
                        DL1.Hours = 14
                        DL1.LogDate = "19 Apr 2019"
                        DL1.LogDate = lblLogDate.Text
                        DL1.EmplyeeWorkType = ddlWorkType.Text
                        DLs.Add(DL1)
                        DL2.LineID = 0
                        DL2.EmployeeID = 4720
                        DL2.Hours = 4
                        DL2.LogDate = "19 Apr 2019"
                        DL2.EmplyeeWorkType = "Work"
                        DLs.Add(DL2)

                        Dim result As String
                        result = PostEmployeeHoursEdit(DLs, DropDownList_Stores.Text)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Juan Carlos
Juan Carlos
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Great answer. Thanks so much