Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > droplist not declared ?

Reply
Thread Tools

droplist not declared ?

 
 
TJS
Guest
Posts: n/a
 
      04-07-2005
I am getting an error message saying HourDropList is not declared
What declaration is required ?


......script function to populate droplist.....


'************************************************* ******
Function HourDropDownList(byVal vHour As Integer)
'
' The HourDropDownList method is used to
' populate HourDropList
'
'************************************************* ******
HourDropList.items.add(New ListItem(-1,"?"))
HourDropList.items.add(New ListItem("1","1"))
HourDropList.items.add(New ListItem("2","2"))
HourDropList.items.add(New ListItem("3","3"))
HourDropList.items.add(New ListItem("4","4"))
HourDropList.items.add(New ListItem("5","5"))
HourDropList.items.add(New ListItem("6","6"))
HourDropList.items.add(New ListItem("7","7"))
HourDropList.items.add(New ListItem("8","8"))
HourDropList.items.add(New ListItem("9","9"))
HourDropList.items.add(New ListItem("10","10"))
HourDropList.items.add(New ListItem("11","11"))
HourDropList.items.add(New ListItem("12","12"))

Dim vID As String = Cstr(vHour) 'Always string
If vHour > 0 then HourDropList.SelectedValue= vID

End Function

........html........

<aspropDownList
id="HourDropList"
AutoPostBack="false"
runat="server" cssClass="" />


 
Reply With Quote
 
 
 
 
Patrick Olurotimi Ige
Guest
Posts: n/a
 
      04-07-2005
TJS did you declare it?




*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      04-07-2005
Make sure your codebehind has definition for HourDropList. It is created
automatically when you switch from html to design view.

Eliyahu

"TJS" <> wrote in message
news:...
> I am getting an error message saying HourDropList is not declared
> What declaration is required ?
>
>
> .....script function to populate droplist.....
>
>
> '************************************************* ******
> Function HourDropDownList(byVal vHour As Integer)
> '
> ' The HourDropDownList method is used to
> ' populate HourDropList
> '
> '************************************************* ******
> HourDropList.items.add(New ListItem(-1,"?"))
> HourDropList.items.add(New ListItem("1","1"))
> HourDropList.items.add(New ListItem("2","2"))
> HourDropList.items.add(New ListItem("3","3"))
> HourDropList.items.add(New ListItem("4","4"))
> HourDropList.items.add(New ListItem("5","5"))
> HourDropList.items.add(New ListItem("6","6"))
> HourDropList.items.add(New ListItem("7","7"))
> HourDropList.items.add(New ListItem("8","8"))
> HourDropList.items.add(New ListItem("9","9"))
> HourDropList.items.add(New ListItem("10","10"))
> HourDropList.items.add(New ListItem("11","11"))
> HourDropList.items.add(New ListItem("12","12"))
>
> Dim vID As String = Cstr(vHour) 'Always string
> If vHour > 0 then HourDropList.SelectedValue= vID
>
> End Function
>
> .......html........
>
> <aspropDownList
> id="HourDropList"
> AutoPostBack="false"
> runat="server" cssClass="" />
>
>



 
Reply With Quote
 
TJS
Guest
Posts: n/a
 
      04-07-2005
um...
that was my question...

"What declaration is required ?"


"Patrick Olurotimi Ige" <> wrote in message
news:...
> TJS did you declare it?
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
Reply With Quote
 
TJS
Guest
Posts: n/a
 
      04-07-2005
I have no codebehind ....


 
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
declared or not declared ? JohnZing ASP .Net 3 02-05-2006 08:38 PM
set selected value on a droplist TJS ASP .Net 2 03-10-2005 06:54 AM
reset selected index on droplist TJS ASP .Net 4 03-07-2005 04:38 AM
Filelist -> Droplist? Lasse Edsvik ASP .Net 1 10-04-2004 08:41 AM
Newbie Question about DropList and Page Load Meir Rotfleisch ASP .Net 2 11-02-2003 04:03 PM



Advertisments