|
-
Jun 12th, 2005, 08:43 PM
#1
Thread Starter
Fanatic Member
WebControl Not declared... but it is? [RESOLVED]
Okay what's with this....
I added the DropDownList from the Web Controls toolbox and put it on my Webform1
I try to use code dropdownlist1.SelectedIndex = 1
But I get an error DropdownList1 is not declared.
I put it on the form and the html code shows that it is there.
What is wrong here?
I've got System.Web in my reference section of my solution.
Any ideas.. i am sure it's an easy answer.
Thanks
Last edited by epixelman; Jun 13th, 2005 at 05:28 AM.
-
Jun 12th, 2005, 11:18 PM
#2
Member
Re: WebControl Not declared... but it is?
Try to see if the following line of code exists under "Web Form Designer Generated Code" region.
VB Code:
Protected WithEvents DropDownList1 As System.Web.UI.WebControls.DropDownList
If it doesnt, add it and then compile your code.
~Nikhil
-
Jun 13th, 2005, 05:26 AM
#3
Thread Starter
Fanatic Member
Re: WebControl Not declared... but it is?
-
Jun 13th, 2005, 05:28 AM
#4
Thread Starter
Fanatic Member
Re: WebControl Not declared... but it is?
duh.... I had it spelled DropownList1
... left out the D
sorry
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|