473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Error(ItemTypes As ArrayList) Name 'ItemTypes' is not declared

Hi Guys,
I have my .aspx below and i'm using SetIndex with selectedIndex with
DropDownList to retrieve Data from my database!!
My function of SetIndex is as follows:-
Function SetIndex(ByVal TheItem As String)

Dim ItemTypes As ArrayList
Dim i As Integer
For i = 0 To ItemTypes.Count - 1
If TheItem = ItemTypes(i) Then
Return i
End If
Next
End Function

When i compile it using VS.NET it comoiles but when i run it i get error
"Name 'ItemTypes' is not declared"
Do i have to still delcare ItemTypes some how..
Pls help!!

My Asp.Net
------------
<asp:TemplateColumn>
<HeaderTemplate>
Type<br>
<asp:DropDownList id="ItemType" runat="server"
DataSource='<%# ItemTypes %>'/>
</HeaderTemplate>
<ItemTemplate>
<asp:DropDownList id="Dropdownlist1" runat="server"
DataSource='<%# ItemTypes %>'
SelectedIndex='<%# SetIndex(Container.DataItem("ItemType")) %>'/>
</ItemTemplate>
</asp:TemplateColumn>

Nov 18 '05 #1
0 911

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: ST | last post by:
Hi, I'm new to vb.net programming, and I keep getting this error: Name 'GetQuery' is not declared. I can't figure out why?? It seems like I have the right references/namespaces. This is my code...
4
by: Andre Arpin | last post by:
I am new at sql so would appreciate some help I have the name of a table in alocal variable is it possible to select this table DECLARE @name sysname SET @name = 'tblSniffedItems' PRINT...
4
by: NuCoder | last post by:
How can i get an item out of an ArrayList to write to a file? I want to add the items to a collection to write them to a file.
9
by: Jerome | last post by:
Hi, I keep getting the same compiler error: 'Name 'SqlDbType' is not declared' and I don't know why? I've declared the following: <%@ Page Language="VB" ContentType="text/html"...
4
by: Agnes | last post by:
As I run the program , there is always error 'Name '_txtCompany' is not declared I didn't modify found, i can't find any named "_txtCompany" in my program I check "txtCompany" , this textbox...
3
by: JohnJohn | last post by:
Hello. I have an aspx page called MyAspx.aspx (for the sake of this discussion) and its associated code file, MyAspx.aspx.vb. In the .vb file, I have declared a variable as follows: Public...
3
by: ritesh4uall | last post by:
Hi, I am getting an error ERROR 'name' is null or not an object i dont know what it means, i am kinda new to javascript Please Help Regards
2
by: Monty | last post by:
Hello, I have a label control in my master page like this: <asp:Label ID=lblStatusMessage runat="server"></asp:Label> When I reference the control in my code-behind I get this error "Name...
1
by: ewart strain | last post by:
Hello all, I have a form thats tied to my access database and all seems to work well except for one small thing. Info on the code: whenever a consultant contract ends they get moved to an...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.