gianitoo
asked on
LIST OF YEARS FOR MY DROPDOWN LIST
NEED A LIST OF YEARS IN ASP.NET 2.0
ASKER
how do i bind it here
<asp:DropDownList ID="yearborn" runat="server">
<asp:ListItem>1976</asp:Li stItem>
<asp:ListItem>1977</asp:Li stItem>
<asp:ListItem>1978</asp:Li stItem>
</asp:DropDownList>
<asp:DropDownList ID="yearborn" runat="server">
<asp:ListItem>1976</asp:Li
<asp:ListItem>1977</asp:Li
<asp:ListItem>1978</asp:Li
</asp:DropDownList>
Theres a solution that is faster than this,
use Generics
List<int> years = new Lis<int>();
for (int i =1850;i<2007; i++)
years.Add(i)
and them
DropDownList ddl = new DropDownList();
ddl.DataSource = years;
ddl.DataBind();
or add directly on DropDownList
DropDownList ddl = new DropDownList();
for (int i = 2007;i > 1850; i--)
ddl.Items.Add(i.ToString() );
Any questions I am here to help you.
Regards, Felipe Lopes
use Generics
List<int> years = new Lis<int>();
for (int i =1850;i<2007; i++)
years.Add(i)
and them
DropDownList ddl = new DropDownList();
ddl.DataSource = years;
ddl.DataBind();
or add directly on DropDownList
DropDownList ddl = new DropDownList();
for (int i = 2007;i > 1850; i--)
ddl.Items.Add(i.ToString()
Any questions I am here to help you.
Regards, Felipe Lopes
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
where are from felipe? i am from peru
is this for VB.net
is this for VB.net
My example is in VB.net, Felipe's is in C#
Oops, forgot to declare the yr variable, either
If Not Page.IsPostBack Then
For yr As Integer=1850 To 2020
yearborn.item.add(yr)
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
If yr = Date.Now.Year Then
yearborn.item(yr).Selected = True
End If
Next yr
End If
Or
Dim yr As Integer
If Not Page.IsPostBack Then
For yr=1850 To 2020
yearborn.item.add(yr)
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
If yr = Date.Now.Year Then
yearborn.item(yr).Selected = True
End If
Next yr
End If
If Not Page.IsPostBack Then
For yr As Integer=1850 To 2020
yearborn.item.add(yr)
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
If yr = Date.Now.Year Then
yearborn.item(yr).Selected
End If
Next yr
End If
Or
Dim yr As Integer
If Not Page.IsPostBack Then
For yr=1850 To 2020
yearborn.item.add(yr)
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
If yr = Date.Now.Year Then
yearborn.item(yr).Selected
End If
Next yr
End If
ASKER
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'yr' is not declared.
Source Error:
Line 5: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Line 6: If Not Page.IsPostBack Then
Line 7: For yr = 1850 To 2020
Line 8: yearborn.item.add(yr)
Line 9: yearborn.item(yr).value = 'you can also set the value of each entry in the list here
Source File: C:\Inetpub\wwwroot\JMI\cro wnroyal\De fault.aspx .vb Line: 7
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'yr' is not declared.
Source Error:
Line 5: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Line 6: If Not Page.IsPostBack Then
Line 7: For yr = 1850 To 2020
Line 8: yearborn.item.add(yr)
Line 9: yearborn.item(yr).value = 'you can also set the value of each entry in the list here
Source File: C:\Inetpub\wwwroot\JMI\cro
Sorry about that, see my post above.
Either Dim yr As Integer before the For loop, or start the For loop with For yr As Integer = 1850 To 2020
Either Dim yr As Integer before the For loop, or start the For loop with For yr As Integer = 1850 To 2020
ASKER
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30456: 'item' is not a member of 'System.Web.UI.WebControls .DropDownL ist'.
Source Error:
Line 7: If Not Page.IsPostBack Then
Line 8: For yr = 1850 To 2020
Line 9: yearborn.item.add(yr)
Line 10: yearborn.item(yr).value = 'you can also set the value of each entry in the list here
Line 11: If yr = Date.Now.Year Then
Source File: C:\Inetpub\wwwroot\JMI\cro wnroyal\De fault.aspx .vb Line: 9
Show Detailed Compiler Output:
c:\windows\system32\inetsr v> "C:\WINDOWS\Microsoft.NET\ Framework\ v2.0.50727 \vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Runtim e.Serializ ation\3.0. 0.0__b77a5 c561934e08 9\System.R untime.Ser ialization .dll" /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Drawin g\2.0.0.0_ _b03f5f7f1 1d50a3a\Sy stem.Drawi ng.dll" /R:"C:\WINDOWS\assembly\GA C_32\Syste m.Enterpri seServices \2.0.0.0__ b03f5f7f11 d50a3a\Sys tem.Enterp riseServic es.dll" /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Web.Mo bile\2.0.0 .0__b03f5f 7f11d50a3a \System.We b.Mobile.d ll" /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Xml\2. 0.0.0__b77 a5c561934e 089\System .Xml.dll" /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Identi tyModel\3. 0.0.0__b77 a5c561934e 089\System .IdentityM odel.dll" /R:"C:\WINDOWS\assembly\GA C_32\Syste m.Web\2.0. 0.0__b03f5 f7f11d50a3 a\System.W eb.dll" /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Web.Se rvices\2.0 .0.0__b03f 5f7f11d50a 3a\System. Web.Servic es.dll" /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem\2.0.0. 0__b77a5c5 61934e089\ System.dll " /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Config uration\2. 0.0.0__b03 f5f7f11d50 a3a\System .Configura tion.dll" /R:"C:\WINDOWS\assembly\GA C_32\Syste m.Data\2.0 .0.0__b77a 5c561934e0 89\System. Data.dll" /R:"C:\WINDOWS\assembly\GA C_MSIL\Sys tem.Servic eModel\3.0 .0.0__b77a 5c561934e0 89\System. ServiceMod el.dll" /out:"C:\WINDOWS\Microsoft .NET\Frame work\v2.0. 50727\Temp orary ASP.NET Files\crownroyal\8f1ff740\ d419feaf\A pp_Web_eex molch.dll" /D:DEBUG=1 /debug+ /win32resource:"C:\WINDOWS \Microsoft .NET\Frame work\v2.0. 50727\Temp orary ASP.NET Files\crownroyal\8f1ff740\ d419feaf\e exmolch.re s" /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualB asic,Syste m,System.C ollections ,System.Co llections. Specialize d,System.C onfigurati on,System. Text,Syste m.Text.Reg ularExpres sions,Syst em.Web,Sys tem.Web.Ca ching,Syst em.Web.Ses sionState, System.Web .Security, System.Web .Profile,S ystem.Web. UI,System. Web.UI.Web Controls,S ystem.Web. UI.WebCont rols.WebPa rts,System .Web.UI.Ht mlControls "C:\WINDOWS\Microsoft.NET\ Framework\ v2.0.50727 \Temporary ASP.NET Files\crownroyal\8f1ff740\ d419feaf\A pp_Web_eex molch.0.vb " "C:\WINDOWS\Microsoft.NET\ Framework\ v2.0.50727 \Temporary ASP.NET Files\crownroyal\8f1ff740\ d419feaf\A pp_Web_eex molch.1.vb " "C:\WINDOWS\Microsoft.NET\ Framework\ v2.0.50727 \Temporary ASP.NET Files\crownroyal\8f1ff740\ d419feaf\A pp_Web_eex molch.2.vb " "C:\WINDOWS\Microsoft.NET\ Framework\ v2.0.50727 \Temporary ASP.NET Files\crownroyal\8f1ff740\ d419feaf\A pp_Web_eex molch.3.vb " "C:\WINDOWS\Microsoft.NET\ Framework\ v2.0.50727 \Temporary ASP.NET Files\crownroyal\8f1ff740\ d419feaf\A pp_Web_eex molch.4.vb "
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
C:\Inetpub\wwwroot\JMI\cro wnroyal\De fault.aspx .vb(9) : error BC30456: 'item' is not a member of 'System.Web.UI.WebControls .DropDownL ist'.
yearborn.item.add(yr)
~~~~~~~~~~~~~
C:\Inetpub\wwwroot\JMI\cro wnroyal\De fault.aspx .vb(10) : error BC30456: 'item' is not a member of 'System.Web.UI.WebControls .DropDownL ist'.
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
~~~~~~~~~~~~~
C:\Inetpub\wwwroot\JMI\cro wnroyal\De fault.aspx .vb(10) : error BC30201: Expression expected.
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
~
C:\Inetpub\wwwroot\JMI\cro wnroyal\De fault.aspx .vb(12) : error BC30456: 'item' is not a member of 'System.Web.UI.WebControls .DropDownL ist'.
yearborn.item(yr).Selected = True
~~~~~~~~~~~~~
Show Complete Compilation Source:
Line 1: #ExternalChecksum("C:\Inet pub\wwwroo t\JMI\crow nroyal\Def ault.aspx" ,"{406ea66 0-64cf-4c8 2-b6f0-42d 48172a799} ","3A2539C 6E74630FD7 A326D3538B 5A938")
Line 2: '------------------------- ---------- ---------- ---------- ---------- ---------- ---
Line 3: ' <auto-generated>
Line 4: ' This code was generated by a tool.
Line 5: ' Runtime Version:2.0.50727.42
Line 6: '
Line 7: ' Changes to this file may cause incorrect behavior and will be lost if
Line 8: ' the code is regenerated.
Line 9: ' </auto-generated>
Line 10: '------------------------- ---------- ---------- ---------- ---------- ---------- ---
Line 11:
Line 12: Option Strict Off
Line 13: Option Explicit On
Line 14:
Line 15: Imports Microsoft.VisualBasic
Line 16: Imports System
Line 17: Imports System.Collections
Line 18: Imports System.Collections.Special ized
Line 19: Imports System.Configuration
Line 20: Imports System.Text
Line 21: Imports System.Text.RegularExpress ions
Line 22: Imports System.Web
Line 23: Imports System.Web.Caching
Line 24: Imports System.Web.Profile
Line 25: Imports System.Web.Security
Line 26: Imports System.Web.SessionState
Line 27: Imports System.Web.UI
Line 28: Imports System.Web.UI.HtmlControls
Line 29: Imports System.Web.UI.WebControls
Line 30: Imports System.Web.UI.WebControls. WebParts
Line 31:
Line 32:
Line 33: Partial Public Class _Default
Line 34: Implements System.Web.SessionState.IR equiresSes sionState
Line 35:
Line 36:
Line 37: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 38: Protected WithEvents DropDownList1 As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 39:
Line 40: #End ExternalSource
Line 41:
Line 42:
Line 43: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 44: Protected WithEvents yearborn As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 45:
Line 46: #End ExternalSource
Line 47:
Line 48:
Line 49: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",3 1)
Line 50: Protected WithEvents Button1 As Global.System.Web.UI.WebCo ntrols.But ton
Line 51:
Line 52: #End ExternalSource
Line 53:
Line 54:
Line 55: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 56: Protected WithEvents form1 As Global.System.Web.UI.HtmlC ontrols.Ht mlForm
Line 57:
Line 58: #End ExternalSource
Line 59:
Line 60: Protected ReadOnly Property Profile() As System.Web.Profile.Default Profile
Line 61: Get
Line 62: Return CType(Me.Context.Profile,S ystem.Web. Profile.De faultProfi le)
Line 63: End Get
Line 64: End Property
Line 65:
Line 66: Protected ReadOnly Property ApplicationInstance() As System.Web.HttpApplication
Line 67: Get
Line 68: Return CType(Me.Context.Applicati onInstance ,System.We b.HttpAppl ication)
Line 69: End Get
Line 70: End Property
Line 71: End Class
Line 72:
Line 73: Namespace ASP
Line 74:
Line 75: <System.Runtime.CompilerSe rvices.Com pilerGloba lScopeAttr ibute()> _
Line 76: Public Class default_aspx
Line 77: Inherits Global._Default
Line 78: Implements System.Web.IHttpHandler
Line 79:
Line 80: Private Shared __initialized As Boolean
Line 81:
Line 82: Private Shared __stringResource As Object
Line 83:
Line 84: Private Shared __fileDependencies As Object
Line 85:
Line 86: Public Sub New()
Line 87: MyBase.New
Line 88: Dim dependencies() As String
Line 89:
Line 90: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx.vb ",912304)
Line 91: CType(Me,System.Web.UI.Pag e).AppRela tiveVirtua lPath = "~/Default.aspx"
Line 92:
Line 93: #End ExternalSource
Line 94: If (Global.ASP.default_aspx._ _initializ ed = false) Then
Line 95: Global.ASP.default_aspx.__ stringReso urce = Me.ReadStringResource
Line 96: dependencies = New String(1) {}
Line 97: dependencies(0) = "~/Default.aspx"
Line 98: dependencies(1) = "~/Default.aspx.vb"
Line 99: Global.ASP.default_aspx.__ fileDepend encies = Me.GetWrappedFileDependenc ies(depend encies)
Line 100: Global.ASP.default_aspx.__ initialize d = true
Line 101: End If
Line 102: Me.Server.ScriptTimeout = 30000000
Line 103: End Sub
Line 104:
Line 105: Protected Overrides ReadOnly Property SupportAutoEvents() As Boolean
Line 106: Get
Line 107: Return false
Line 108: End Get
Line 109: End Property
Line 110:
Line 111: Private Function __BuildControl__control3() As Global.System.Web.UI.HtmlC ontrols.Ht mlTitle
Line 112: Dim __ctrl As Global.System.Web.UI.HtmlC ontrols.Ht mlTitle
Line 113:
Line 114: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",7 )
Line 115: __ctrl = New Global.System.Web.UI.HtmlC ontrols.Ht mlTitle
Line 116:
Line 117: #End ExternalSource
Line 118: Dim __parser As System.Web.UI.IParserAcces sor = CType(__ctrl,System.Web.UI .IParserAc cessor)
Line 119:
Line 120: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",7 )
Line 121: __parser.AddParsedSubObjec t(New System.Web.UI.LiteralContr ol("Untitl ed Page"))
Line 122:
Line 123: #End ExternalSource
Line 124: Return __ctrl
Line 125: End Function
Line 126:
Line 127: Private Function __BuildControl__control2() As Global.System.Web.UI.HtmlC ontrols.Ht mlHead
Line 128: Dim __ctrl As Global.System.Web.UI.HtmlC ontrols.Ht mlHead
Line 129:
Line 130: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",6 )
Line 131: __ctrl = New Global.System.Web.UI.HtmlC ontrols.Ht mlHead("he ad")
Line 132:
Line 133: #End ExternalSource
Line 134: Dim __ctrl1 As Global.System.Web.UI.HtmlC ontrols.Ht mlTitle
Line 135:
Line 136: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",6 )
Line 137: __ctrl1 = Me.__BuildControl__control 3
Line 138:
Line 139: #End ExternalSource
Line 140: Dim __parser As System.Web.UI.IParserAcces sor = CType(__ctrl,System.Web.UI .IParserAc cessor)
Line 141:
Line 142: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",6 )
Line 143: __parser.AddParsedSubObjec t(__ctrl1)
Line 144:
Line 145: #End ExternalSource
Line 146: Return __ctrl
Line 147: End Function
Line 148:
Line 149: Private Function __BuildControl__control5() As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 150: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 151:
Line 152: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 9)
Line 153: __ctrl = New Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 154:
Line 155: #End ExternalSource
Line 156:
Line 157: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 9)
Line 158: __ctrl.Text = "USA"
Line 159:
Line 160: #End ExternalSource
Line 161: Return __ctrl
Line 162: End Function
Line 163:
Line 164: Private Function __BuildControl__control6() As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 165: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 166:
Line 167: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 0)
Line 168: __ctrl = New Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 169:
Line 170: #End ExternalSource
Line 171:
Line 172: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 0)
Line 173: __ctrl.Text = "Canada"
Line 174:
Line 175: #End ExternalSource
Line 176: Return __ctrl
Line 177: End Function
Line 178:
Line 179: Private Sub __BuildControl__control4(B yVal __ctrl As System.Web.UI.WebControls. ListItemCo llection)
Line 180: Dim __ctrl1 As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 181:
Line 182: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 183: __ctrl1 = Me.__BuildControl__control 5
Line 184:
Line 185: #End ExternalSource
Line 186:
Line 187: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 188: __ctrl.Add(__ctrl1)
Line 189:
Line 190: #End ExternalSource
Line 191: Dim __ctrl2 As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 192:
Line 193: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 194: __ctrl2 = Me.__BuildControl__control 6
Line 195:
Line 196: #End ExternalSource
Line 197:
Line 198: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 199: __ctrl.Add(__ctrl2)
Line 200:
Line 201: #End ExternalSource
Line 202: End Sub
Line 203:
Line 204: Private Function __BuildControlDropDownList 1() As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 205: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 206:
Line 207: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 208: __ctrl = New Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 209:
Line 210: #End ExternalSource
Line 211: Me.DropDownList1 = __ctrl
Line 212: __ctrl.ApplyStyleSheetSkin (Me)
Line 213:
Line 214: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 215: __ctrl.ID = "DropDownList1"
Line 216:
Line 217: #End ExternalSource
Line 218:
Line 219: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 220: __ctrl.AutoPostBack = true
Line 221:
Line 222: #End ExternalSource
Line 223:
Line 224: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 8)
Line 225: Me.__BuildControl__control 4(__ctrl.I tems)
Line 226:
Line 227: #End ExternalSource
Line 228: Return __ctrl
Line 229: End Function
Line 230:
Line 231: Private Function __BuildControl__control8() As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 232: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 233:
Line 234: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 6)
Line 235: __ctrl = New Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 236:
Line 237: #End ExternalSource
Line 238:
Line 239: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 6)
Line 240: __ctrl.Text = "1976"
Line 241:
Line 242: #End ExternalSource
Line 243: Return __ctrl
Line 244: End Function
Line 245:
Line 246: Private Function __BuildControl__control9() As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 247: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 248:
Line 249: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 7)
Line 250: __ctrl = New Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 251:
Line 252: #End ExternalSource
Line 253:
Line 254: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 7)
Line 255: __ctrl.Text = "1977"
Line 256:
Line 257: #End ExternalSource
Line 258: Return __ctrl
Line 259: End Function
Line 260:
Line 261: Private Function __BuildControl__control10( ) As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 262: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 263:
Line 264: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 8)
Line 265: __ctrl = New Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 266:
Line 267: #End ExternalSource
Line 268:
Line 269: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 8)
Line 270: __ctrl.Text = "1978"
Line 271:
Line 272: #End ExternalSource
Line 273: Return __ctrl
Line 274: End Function
Line 275:
Line 276: Private Sub __BuildControl__control7(B yVal __ctrl As System.Web.UI.WebControls. ListItemCo llection)
Line 277: Dim __ctrl1 As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 278:
Line 279: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 280: __ctrl1 = Me.__BuildControl__control 8
Line 281:
Line 282: #End ExternalSource
Line 283:
Line 284: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 285: __ctrl.Add(__ctrl1)
Line 286:
Line 287: #End ExternalSource
Line 288: Dim __ctrl2 As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 289:
Line 290: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 291: __ctrl2 = Me.__BuildControl__control 9
Line 292:
Line 293: #End ExternalSource
Line 294:
Line 295: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 296: __ctrl.Add(__ctrl2)
Line 297:
Line 298: #End ExternalSource
Line 299: Dim __ctrl3 As Global.System.Web.UI.WebCo ntrols.Lis tItem
Line 300:
Line 301: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 302: __ctrl3 = Me.__BuildControl__control 10
Line 303:
Line 304: #End ExternalSource
Line 305:
Line 306: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 307: __ctrl.Add(__ctrl3)
Line 308:
Line 309: #End ExternalSource
Line 310: End Sub
Line 311:
Line 312: Private Function __BuildControlyearborn() As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 313: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 314:
Line 315: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 316: __ctrl = New Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 317:
Line 318: #End ExternalSource
Line 319: Me.yearborn = __ctrl
Line 320: __ctrl.ApplyStyleSheetSkin (Me)
Line 321:
Line 322: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 323: __ctrl.ID = "yearborn"
Line 324:
Line 325: #End ExternalSource
Line 326:
Line 327: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",2 5)
Line 328: Me.__BuildControl__control 7(__ctrl.I tems)
Line 329:
Line 330: #End ExternalSource
Line 331: Return __ctrl
Line 332: End Function
Line 333:
Line 334: Private Function __BuildControlButton1() As Global.System.Web.UI.WebCo ntrols.But ton
Line 335: Dim __ctrl As Global.System.Web.UI.WebCo ntrols.But ton
Line 336:
Line 337: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",3 1)
Line 338: __ctrl = New Global.System.Web.UI.WebCo ntrols.But ton
Line 339:
Line 340: #End ExternalSource
Line 341: Me.Button1 = __ctrl
Line 342: __ctrl.ApplyStyleSheetSkin (Me)
Line 343:
Line 344: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",3 1)
Line 345: __ctrl.ID = "Button1"
Line 346:
Line 347: #End ExternalSource
Line 348:
Line 349: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",3 1)
Line 350: __ctrl.Text = "Button"
Line 351:
Line 352: #End ExternalSource
Line 353: Return __ctrl
Line 354: End Function
Line 355:
Line 356: Private Function __BuildControlform1() As Global.System.Web.UI.HtmlC ontrols.Ht mlForm
Line 357: Dim __ctrl As Global.System.Web.UI.HtmlC ontrols.Ht mlForm
Line 358:
Line 359: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 360: __ctrl = New Global.System.Web.UI.HtmlC ontrols.Ht mlForm
Line 361:
Line 362: #End ExternalSource
Line 363: Me.form1 = __ctrl
Line 364:
Line 365: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 366: __ctrl.ID = "form1"
Line 367:
Line 368: #End ExternalSource
Line 369: Dim __parser As System.Web.UI.IParserAcces sor = CType(__ctrl,System.Web.UI .IParserAc cessor)
Line 370:
Line 371: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 372: __parser.AddParsedSubObjec t(Me.Creat eResourceB asedLitera lControl(4 56, 514, true))
Line 373:
Line 374: #End ExternalSource
Line 375: Dim __ctrl1 As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 376:
Line 377: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 378: __ctrl1 = Me.__BuildControlDropDownL ist1
Line 379:
Line 380: #End ExternalSource
Line 381:
Line 382: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 383: __parser.AddParsedSubObjec t(__ctrl1)
Line 384:
Line 385: #End ExternalSource
Line 386:
Line 387: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 388: __parser.AddParsedSubObjec t(New System.Web.UI.LiteralContr ol("<br />"&Global.Microsoft.Visua lBasic.Chr W(13)&Glob al.Microso ft.VisualB asic.ChrW( 10)&" <br />"&Global.Microsoft.Visua lBasic.Chr W(13)&Glob al.Microso ft.VisualB asic.ChrW( 10)&" "&Global.Microsoft.VisualB asic.ChrW( 13)&Global .Microsoft .VisualBas ic.ChrW(10 )&" "& _
Line 389: "WHEN WERE YOU BORN?<br />"&Global.Microsoft.Visua lBasic.Chr W(13)&Glob al.Microso ft.VisualB asic.ChrW( 10)&" "))
Line 390:
Line 391: #End ExternalSource
Line 392: Dim __ctrl2 As Global.System.Web.UI.WebCo ntrols.Dro pDownList
Line 393:
Line 394: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 395: __ctrl2 = Me.__BuildControlyearborn
Line 396:
Line 397: #End ExternalSource
Line 398:
Line 399: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 400: __parser.AddParsedSubObjec t(__ctrl2)
Line 401:
Line 402: #End ExternalSource
Line 403:
Line 404: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 405: __parser.AddParsedSubObjec t(New System.Web.UI.LiteralContr ol("<br />"&Global.Microsoft.Visua lBasic.Chr W(13)&Glob al.Microso ft.VisualB asic.ChrW( 10)&" <br />"&Global.Microsoft.Visua lBasic.Chr W(13)&Glob al.Microso ft.VisualB asic.ChrW( 10)&" "))
Line 406:
Line 407: #End ExternalSource
Line 408: Dim __ctrl3 As Global.System.Web.UI.WebCo ntrols.But ton
Line 409:
Line 410: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 411: __ctrl3 = Me.__BuildControlButton1
Line 412:
Line 413: #End ExternalSource
Line 414:
Line 415: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 416: __parser.AddParsedSubObjec t(__ctrl3)
Line 417:
Line 418: #End ExternalSource
Line 419:
Line 420: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 0)
Line 421: __parser.AddParsedSubObjec t(New System.Web.UI.LiteralContr ol("</div> "&Global.M icrosoft.V isualBasic .ChrW(13)& Global.Mic rosoft.Vis ualBasic.C hrW(10)&" "&Global.Microsoft.VisualB asic.ChrW( 13)&Global .Microsoft .VisualBas ic.ChrW(10 )&" "&Global.Microsoft.VisualB asic.ChrW( 13)&Global .Microsoft .VisualBas ic.ChrW(10 )&Global.M icrosoft.V isualBasic .ChrW(13)& Global.Mic rosoft.Vis ualBasic.C hrW(10)&" "))
Line 422:
Line 423: #End ExternalSource
Line 424: Return __ctrl
Line 425: End Function
Line 426:
Line 427: Private Sub __BuildControlTree(ByVal __ctrl As default_aspx)
Line 428:
Line 429: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 430: Me.InitializeCulture
Line 431:
Line 432: #End ExternalSource
Line 433: Dim __parser As System.Web.UI.IParserAcces sor = CType(__ctrl,System.Web.UI .IParserAc cessor)
Line 434:
Line 435: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 436: __parser.AddParsedSubObjec t(New System.Web.UI.LiteralContr ol(""&Glob al.Microso ft.VisualB asic.ChrW( 13)&Global .Microsoft .VisualBas ic.ChrW(10 )&Global.M icrosoft.V isualBasic .ChrW(13)& Global.Mic rosoft.Vis ualBasic.C hrW(10)&"< !DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3"& _
Line 437: ".org/TR/xhtml1/DTD/xhtml1 -transitio nal.dtd""> "&Global.M icrosoft.V isualBasic .ChrW(13)& Global.Mic rosoft.Vis ualBasic.C hrW(10)&Gl obal.Micro soft.Visua lBasic.Chr W(13)&Glob al.Microso ft.VisualB asic.ChrW( 10)&"<html xmlns=""http://www.w3.org/1"& _
Line 438: "999/xhtml"" >"&Global.Microsoft.Visual Basic.ChrW (13)&Globa l.Microsof t.VisualBa sic.ChrW(1 0)))
Line 439:
Line 440: #End ExternalSource
Line 441: Dim __ctrl1 As Global.System.Web.UI.HtmlC ontrols.Ht mlHead
Line 442:
Line 443: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 444: __ctrl1 = Me.__BuildControl__control 2
Line 445:
Line 446: #End ExternalSource
Line 447:
Line 448: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 449: __parser.AddParsedSubObjec t(__ctrl1)
Line 450:
Line 451: #End ExternalSource
Line 452:
Line 453: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 454: __parser.AddParsedSubObjec t(New System.Web.UI.LiteralContr ol(""&Glob al.Microso ft.VisualB asic.ChrW( 13)&Global .Microsoft .VisualBas ic.ChrW(10 )&"<body>" &Global.Mi crosoft.Vi sualBasic. ChrW(13)&G lobal.Micr osoft.Visu alBasic.Ch rW(10)&" "))
Line 455:
Line 456: #End ExternalSource
Line 457: Dim __ctrl2 As Global.System.Web.UI.HtmlC ontrols.Ht mlForm
Line 458:
Line 459: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 460: __ctrl2 = Me.__BuildControlform1
Line 461:
Line 462: #End ExternalSource
Line 463:
Line 464: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 465: __parser.AddParsedSubObjec t(__ctrl2)
Line 466:
Line 467: #End ExternalSource
Line 468:
Line 469: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx",1 )
Line 470: __parser.AddParsedSubObjec t(New System.Web.UI.LiteralContr ol(""&Glob al.Microso ft.VisualB asic.ChrW( 13)&Global .Microsoft .VisualBas ic.ChrW(10 )&"</body> "&Global.M icrosoft.V isualBasic .ChrW(13)& Global.Mic rosoft.Vis ualBasic.C hrW(10)&"< /html>"&Gl obal.Micro soft.Visua lBasic.Chr W(13)&Glob al.Microso ft.VisualB asic.ChrW( 10)))
Line 471:
Line 472: #End ExternalSource
Line 473: End Sub
Line 474:
Line 475:
Line 476: #ExternalSource("C:\Inetpu b\wwwroot\ JMI\crownr oyal\Defau lt.aspx.vb ",912304)
Line 477: Protected Overrides Sub FrameworkInitialize()
Line 478: MyBase.FrameworkInitialize
Line 479: SetStringResourcePointer(G lobal.ASP. default_as px.__strin gResource, 0)
Line 480: Me.__BuildControlTree(Me)
Line 481: Me.AddWrappedFileDependenc ies(Global .ASP.defau lt_aspx.__ fileDepend encies)
Line 482: Me.Request.ValidateInput
Line 483: End Sub
Line 484:
Line 485: #End ExternalSource
Line 486:
Line 487: Public Overrides Function GetTypeHashCode() As Integer
Line 488: Return -2105383257
Line 489: End Function
Line 490:
Line 491: Public Overrides Sub ProcessRequest(ByVal context As System.Web.HttpContext)
Line 492: MyBase.ProcessRequest(cont ext)
Line 493: End Sub
Line 494: End Class
Line 495: End Namespace
Line 496:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30456: 'item' is not a member of 'System.Web.UI.WebControls
Source Error:
Line 7: If Not Page.IsPostBack Then
Line 8: For yr = 1850 To 2020
Line 9: yearborn.item.add(yr)
Line 10: yearborn.item(yr).value = 'you can also set the value of each entry in the list here
Line 11: If yr = Date.Now.Year Then
Source File: C:\Inetpub\wwwroot\JMI\cro
Show Detailed Compiler Output:
c:\windows\system32\inetsr
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
C:\Inetpub\wwwroot\JMI\cro
yearborn.item.add(yr)
~~~~~~~~~~~~~
C:\Inetpub\wwwroot\JMI\cro
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
~~~~~~~~~~~~~
C:\Inetpub\wwwroot\JMI\cro
yearborn.item(yr).value = 'you can also set the value of each entry in the list here
~
C:\Inetpub\wwwroot\JMI\cro
yearborn.item(yr).Selected
~~~~~~~~~~~~~
Show Complete Compilation Source:
Line 1: #ExternalChecksum("C:\Inet
Line 2: '-------------------------
Line 3: ' <auto-generated>
Line 4: ' This code was generated by a tool.
Line 5: ' Runtime Version:2.0.50727.42
Line 6: '
Line 7: ' Changes to this file may cause incorrect behavior and will be lost if
Line 8: ' the code is regenerated.
Line 9: ' </auto-generated>
Line 10: '-------------------------
Line 11:
Line 12: Option Strict Off
Line 13: Option Explicit On
Line 14:
Line 15: Imports Microsoft.VisualBasic
Line 16: Imports System
Line 17: Imports System.Collections
Line 18: Imports System.Collections.Special
Line 19: Imports System.Configuration
Line 20: Imports System.Text
Line 21: Imports System.Text.RegularExpress
Line 22: Imports System.Web
Line 23: Imports System.Web.Caching
Line 24: Imports System.Web.Profile
Line 25: Imports System.Web.Security
Line 26: Imports System.Web.SessionState
Line 27: Imports System.Web.UI
Line 28: Imports System.Web.UI.HtmlControls
Line 29: Imports System.Web.UI.WebControls
Line 30: Imports System.Web.UI.WebControls.
Line 31:
Line 32:
Line 33: Partial Public Class _Default
Line 34: Implements System.Web.SessionState.IR
Line 35:
Line 36:
Line 37: #ExternalSource("C:\Inetpu
Line 38: Protected WithEvents DropDownList1 As Global.System.Web.UI.WebCo
Line 39:
Line 40: #End ExternalSource
Line 41:
Line 42:
Line 43: #ExternalSource("C:\Inetpu
Line 44: Protected WithEvents yearborn As Global.System.Web.UI.WebCo
Line 45:
Line 46: #End ExternalSource
Line 47:
Line 48:
Line 49: #ExternalSource("C:\Inetpu
Line 50: Protected WithEvents Button1 As Global.System.Web.UI.WebCo
Line 51:
Line 52: #End ExternalSource
Line 53:
Line 54:
Line 55: #ExternalSource("C:\Inetpu
Line 56: Protected WithEvents form1 As Global.System.Web.UI.HtmlC
Line 57:
Line 58: #End ExternalSource
Line 59:
Line 60: Protected ReadOnly Property Profile() As System.Web.Profile.Default
Line 61: Get
Line 62: Return CType(Me.Context.Profile,S
Line 63: End Get
Line 64: End Property
Line 65:
Line 66: Protected ReadOnly Property ApplicationInstance() As System.Web.HttpApplication
Line 67: Get
Line 68: Return CType(Me.Context.Applicati
Line 69: End Get
Line 70: End Property
Line 71: End Class
Line 72:
Line 73: Namespace ASP
Line 74:
Line 75: <System.Runtime.CompilerSe
Line 76: Public Class default_aspx
Line 77: Inherits Global._Default
Line 78: Implements System.Web.IHttpHandler
Line 79:
Line 80: Private Shared __initialized As Boolean
Line 81:
Line 82: Private Shared __stringResource As Object
Line 83:
Line 84: Private Shared __fileDependencies As Object
Line 85:
Line 86: Public Sub New()
Line 87: MyBase.New
Line 88: Dim dependencies() As String
Line 89:
Line 90: #ExternalSource("C:\Inetpu
Line 91: CType(Me,System.Web.UI.Pag
Line 92:
Line 93: #End ExternalSource
Line 94: If (Global.ASP.default_aspx._
Line 95: Global.ASP.default_aspx.__
Line 96: dependencies = New String(1) {}
Line 97: dependencies(0) = "~/Default.aspx"
Line 98: dependencies(1) = "~/Default.aspx.vb"
Line 99: Global.ASP.default_aspx.__
Line 100: Global.ASP.default_aspx.__
Line 101: End If
Line 102: Me.Server.ScriptTimeout = 30000000
Line 103: End Sub
Line 104:
Line 105: Protected Overrides ReadOnly Property SupportAutoEvents() As Boolean
Line 106: Get
Line 107: Return false
Line 108: End Get
Line 109: End Property
Line 110:
Line 111: Private Function __BuildControl__control3()
Line 112: Dim __ctrl As Global.System.Web.UI.HtmlC
Line 113:
Line 114: #ExternalSource("C:\Inetpu
Line 115: __ctrl = New Global.System.Web.UI.HtmlC
Line 116:
Line 117: #End ExternalSource
Line 118: Dim __parser As System.Web.UI.IParserAcces
Line 119:
Line 120: #ExternalSource("C:\Inetpu
Line 121: __parser.AddParsedSubObjec
Line 122:
Line 123: #End ExternalSource
Line 124: Return __ctrl
Line 125: End Function
Line 126:
Line 127: Private Function __BuildControl__control2()
Line 128: Dim __ctrl As Global.System.Web.UI.HtmlC
Line 129:
Line 130: #ExternalSource("C:\Inetpu
Line 131: __ctrl = New Global.System.Web.UI.HtmlC
Line 132:
Line 133: #End ExternalSource
Line 134: Dim __ctrl1 As Global.System.Web.UI.HtmlC
Line 135:
Line 136: #ExternalSource("C:\Inetpu
Line 137: __ctrl1 = Me.__BuildControl__control
Line 138:
Line 139: #End ExternalSource
Line 140: Dim __parser As System.Web.UI.IParserAcces
Line 141:
Line 142: #ExternalSource("C:\Inetpu
Line 143: __parser.AddParsedSubObjec
Line 144:
Line 145: #End ExternalSource
Line 146: Return __ctrl
Line 147: End Function
Line 148:
Line 149: Private Function __BuildControl__control5()
Line 150: Dim __ctrl As Global.System.Web.UI.WebCo
Line 151:
Line 152: #ExternalSource("C:\Inetpu
Line 153: __ctrl = New Global.System.Web.UI.WebCo
Line 154:
Line 155: #End ExternalSource
Line 156:
Line 157: #ExternalSource("C:\Inetpu
Line 158: __ctrl.Text = "USA"
Line 159:
Line 160: #End ExternalSource
Line 161: Return __ctrl
Line 162: End Function
Line 163:
Line 164: Private Function __BuildControl__control6()
Line 165: Dim __ctrl As Global.System.Web.UI.WebCo
Line 166:
Line 167: #ExternalSource("C:\Inetpu
Line 168: __ctrl = New Global.System.Web.UI.WebCo
Line 169:
Line 170: #End ExternalSource
Line 171:
Line 172: #ExternalSource("C:\Inetpu
Line 173: __ctrl.Text = "Canada"
Line 174:
Line 175: #End ExternalSource
Line 176: Return __ctrl
Line 177: End Function
Line 178:
Line 179: Private Sub __BuildControl__control4(B
Line 180: Dim __ctrl1 As Global.System.Web.UI.WebCo
Line 181:
Line 182: #ExternalSource("C:\Inetpu
Line 183: __ctrl1 = Me.__BuildControl__control
Line 184:
Line 185: #End ExternalSource
Line 186:
Line 187: #ExternalSource("C:\Inetpu
Line 188: __ctrl.Add(__ctrl1)
Line 189:
Line 190: #End ExternalSource
Line 191: Dim __ctrl2 As Global.System.Web.UI.WebCo
Line 192:
Line 193: #ExternalSource("C:\Inetpu
Line 194: __ctrl2 = Me.__BuildControl__control
Line 195:
Line 196: #End ExternalSource
Line 197:
Line 198: #ExternalSource("C:\Inetpu
Line 199: __ctrl.Add(__ctrl2)
Line 200:
Line 201: #End ExternalSource
Line 202: End Sub
Line 203:
Line 204: Private Function __BuildControlDropDownList
Line 205: Dim __ctrl As Global.System.Web.UI.WebCo
Line 206:
Line 207: #ExternalSource("C:\Inetpu
Line 208: __ctrl = New Global.System.Web.UI.WebCo
Line 209:
Line 210: #End ExternalSource
Line 211: Me.DropDownList1 = __ctrl
Line 212: __ctrl.ApplyStyleSheetSkin
Line 213:
Line 214: #ExternalSource("C:\Inetpu
Line 215: __ctrl.ID = "DropDownList1"
Line 216:
Line 217: #End ExternalSource
Line 218:
Line 219: #ExternalSource("C:\Inetpu
Line 220: __ctrl.AutoPostBack = true
Line 221:
Line 222: #End ExternalSource
Line 223:
Line 224: #ExternalSource("C:\Inetpu
Line 225: Me.__BuildControl__control
Line 226:
Line 227: #End ExternalSource
Line 228: Return __ctrl
Line 229: End Function
Line 230:
Line 231: Private Function __BuildControl__control8()
Line 232: Dim __ctrl As Global.System.Web.UI.WebCo
Line 233:
Line 234: #ExternalSource("C:\Inetpu
Line 235: __ctrl = New Global.System.Web.UI.WebCo
Line 236:
Line 237: #End ExternalSource
Line 238:
Line 239: #ExternalSource("C:\Inetpu
Line 240: __ctrl.Text = "1976"
Line 241:
Line 242: #End ExternalSource
Line 243: Return __ctrl
Line 244: End Function
Line 245:
Line 246: Private Function __BuildControl__control9()
Line 247: Dim __ctrl As Global.System.Web.UI.WebCo
Line 248:
Line 249: #ExternalSource("C:\Inetpu
Line 250: __ctrl = New Global.System.Web.UI.WebCo
Line 251:
Line 252: #End ExternalSource
Line 253:
Line 254: #ExternalSource("C:\Inetpu
Line 255: __ctrl.Text = "1977"
Line 256:
Line 257: #End ExternalSource
Line 258: Return __ctrl
Line 259: End Function
Line 260:
Line 261: Private Function __BuildControl__control10(
Line 262: Dim __ctrl As Global.System.Web.UI.WebCo
Line 263:
Line 264: #ExternalSource("C:\Inetpu
Line 265: __ctrl = New Global.System.Web.UI.WebCo
Line 266:
Line 267: #End ExternalSource
Line 268:
Line 269: #ExternalSource("C:\Inetpu
Line 270: __ctrl.Text = "1978"
Line 271:
Line 272: #End ExternalSource
Line 273: Return __ctrl
Line 274: End Function
Line 275:
Line 276: Private Sub __BuildControl__control7(B
Line 277: Dim __ctrl1 As Global.System.Web.UI.WebCo
Line 278:
Line 279: #ExternalSource("C:\Inetpu
Line 280: __ctrl1 = Me.__BuildControl__control
Line 281:
Line 282: #End ExternalSource
Line 283:
Line 284: #ExternalSource("C:\Inetpu
Line 285: __ctrl.Add(__ctrl1)
Line 286:
Line 287: #End ExternalSource
Line 288: Dim __ctrl2 As Global.System.Web.UI.WebCo
Line 289:
Line 290: #ExternalSource("C:\Inetpu
Line 291: __ctrl2 = Me.__BuildControl__control
Line 292:
Line 293: #End ExternalSource
Line 294:
Line 295: #ExternalSource("C:\Inetpu
Line 296: __ctrl.Add(__ctrl2)
Line 297:
Line 298: #End ExternalSource
Line 299: Dim __ctrl3 As Global.System.Web.UI.WebCo
Line 300:
Line 301: #ExternalSource("C:\Inetpu
Line 302: __ctrl3 = Me.__BuildControl__control
Line 303:
Line 304: #End ExternalSource
Line 305:
Line 306: #ExternalSource("C:\Inetpu
Line 307: __ctrl.Add(__ctrl3)
Line 308:
Line 309: #End ExternalSource
Line 310: End Sub
Line 311:
Line 312: Private Function __BuildControlyearborn() As Global.System.Web.UI.WebCo
Line 313: Dim __ctrl As Global.System.Web.UI.WebCo
Line 314:
Line 315: #ExternalSource("C:\Inetpu
Line 316: __ctrl = New Global.System.Web.UI.WebCo
Line 317:
Line 318: #End ExternalSource
Line 319: Me.yearborn = __ctrl
Line 320: __ctrl.ApplyStyleSheetSkin
Line 321:
Line 322: #ExternalSource("C:\Inetpu
Line 323: __ctrl.ID = "yearborn"
Line 324:
Line 325: #End ExternalSource
Line 326:
Line 327: #ExternalSource("C:\Inetpu
Line 328: Me.__BuildControl__control
Line 329:
Line 330: #End ExternalSource
Line 331: Return __ctrl
Line 332: End Function
Line 333:
Line 334: Private Function __BuildControlButton1() As Global.System.Web.UI.WebCo
Line 335: Dim __ctrl As Global.System.Web.UI.WebCo
Line 336:
Line 337: #ExternalSource("C:\Inetpu
Line 338: __ctrl = New Global.System.Web.UI.WebCo
Line 339:
Line 340: #End ExternalSource
Line 341: Me.Button1 = __ctrl
Line 342: __ctrl.ApplyStyleSheetSkin
Line 343:
Line 344: #ExternalSource("C:\Inetpu
Line 345: __ctrl.ID = "Button1"
Line 346:
Line 347: #End ExternalSource
Line 348:
Line 349: #ExternalSource("C:\Inetpu
Line 350: __ctrl.Text = "Button"
Line 351:
Line 352: #End ExternalSource
Line 353: Return __ctrl
Line 354: End Function
Line 355:
Line 356: Private Function __BuildControlform1() As Global.System.Web.UI.HtmlC
Line 357: Dim __ctrl As Global.System.Web.UI.HtmlC
Line 358:
Line 359: #ExternalSource("C:\Inetpu
Line 360: __ctrl = New Global.System.Web.UI.HtmlC
Line 361:
Line 362: #End ExternalSource
Line 363: Me.form1 = __ctrl
Line 364:
Line 365: #ExternalSource("C:\Inetpu
Line 366: __ctrl.ID = "form1"
Line 367:
Line 368: #End ExternalSource
Line 369: Dim __parser As System.Web.UI.IParserAcces
Line 370:
Line 371: #ExternalSource("C:\Inetpu
Line 372: __parser.AddParsedSubObjec
Line 373:
Line 374: #End ExternalSource
Line 375: Dim __ctrl1 As Global.System.Web.UI.WebCo
Line 376:
Line 377: #ExternalSource("C:\Inetpu
Line 378: __ctrl1 = Me.__BuildControlDropDownL
Line 379:
Line 380: #End ExternalSource
Line 381:
Line 382: #ExternalSource("C:\Inetpu
Line 383: __parser.AddParsedSubObjec
Line 384:
Line 385: #End ExternalSource
Line 386:
Line 387: #ExternalSource("C:\Inetpu
Line 388: __parser.AddParsedSubObjec
Line 389: "WHEN WERE YOU BORN?<br />"&Global.Microsoft.Visua
Line 390:
Line 391: #End ExternalSource
Line 392: Dim __ctrl2 As Global.System.Web.UI.WebCo
Line 393:
Line 394: #ExternalSource("C:\Inetpu
Line 395: __ctrl2 = Me.__BuildControlyearborn
Line 396:
Line 397: #End ExternalSource
Line 398:
Line 399: #ExternalSource("C:\Inetpu
Line 400: __parser.AddParsedSubObjec
Line 401:
Line 402: #End ExternalSource
Line 403:
Line 404: #ExternalSource("C:\Inetpu
Line 405: __parser.AddParsedSubObjec
Line 406:
Line 407: #End ExternalSource
Line 408: Dim __ctrl3 As Global.System.Web.UI.WebCo
Line 409:
Line 410: #ExternalSource("C:\Inetpu
Line 411: __ctrl3 = Me.__BuildControlButton1
Line 412:
Line 413: #End ExternalSource
Line 414:
Line 415: #ExternalSource("C:\Inetpu
Line 416: __parser.AddParsedSubObjec
Line 417:
Line 418: #End ExternalSource
Line 419:
Line 420: #ExternalSource("C:\Inetpu
Line 421: __parser.AddParsedSubObjec
Line 422:
Line 423: #End ExternalSource
Line 424: Return __ctrl
Line 425: End Function
Line 426:
Line 427: Private Sub __BuildControlTree(ByVal __ctrl As default_aspx)
Line 428:
Line 429: #ExternalSource("C:\Inetpu
Line 430: Me.InitializeCulture
Line 431:
Line 432: #End ExternalSource
Line 433: Dim __parser As System.Web.UI.IParserAcces
Line 434:
Line 435: #ExternalSource("C:\Inetpu
Line 436: __parser.AddParsedSubObjec
Line 437: ".org/TR/xhtml1/DTD/xhtml1
Line 438: "999/xhtml"" >"&Global.Microsoft.Visual
Line 439:
Line 440: #End ExternalSource
Line 441: Dim __ctrl1 As Global.System.Web.UI.HtmlC
Line 442:
Line 443: #ExternalSource("C:\Inetpu
Line 444: __ctrl1 = Me.__BuildControl__control
Line 445:
Line 446: #End ExternalSource
Line 447:
Line 448: #ExternalSource("C:\Inetpu
Line 449: __parser.AddParsedSubObjec
Line 450:
Line 451: #End ExternalSource
Line 452:
Line 453: #ExternalSource("C:\Inetpu
Line 454: __parser.AddParsedSubObjec
Line 455:
Line 456: #End ExternalSource
Line 457: Dim __ctrl2 As Global.System.Web.UI.HtmlC
Line 458:
Line 459: #ExternalSource("C:\Inetpu
Line 460: __ctrl2 = Me.__BuildControlform1
Line 461:
Line 462: #End ExternalSource
Line 463:
Line 464: #ExternalSource("C:\Inetpu
Line 465: __parser.AddParsedSubObjec
Line 466:
Line 467: #End ExternalSource
Line 468:
Line 469: #ExternalSource("C:\Inetpu
Line 470: __parser.AddParsedSubObjec
Line 471:
Line 472: #End ExternalSource
Line 473: End Sub
Line 474:
Line 475:
Line 476: #ExternalSource("C:\Inetpu
Line 477: Protected Overrides Sub FrameworkInitialize()
Line 478: MyBase.FrameworkInitialize
Line 479: SetStringResourcePointer(G
Line 480: Me.__BuildControlTree(Me)
Line 481: Me.AddWrappedFileDependenc
Line 482: Me.Request.ValidateInput
Line 483: End Sub
Line 484:
Line 485: #End ExternalSource
Line 486:
Line 487: Public Overrides Function GetTypeHashCode() As Integer
Line 488: Return -2105383257
Line 489: End Function
Line 490:
Line 491: Public Overrides Sub ProcessRequest(ByVal context As System.Web.HttpContext)
Line 492: MyBase.ProcessRequest(cont
Line 493: End Sub
Line 494: End Class
Line 495: End Namespace
Line 496:
yearborn.Item.Add(yr).
Also... there's really no need to post the 500 lines of code. The error and lines 7-11 are plenty.
Also... there's really no need to post the 500 lines of code. The error and lines 7-11 are plenty.
If Not Page.IsPostBack Then
For yr As Integer=1850 To 2020
yearborn.items.add(yr)
yearborn.items(yr).value = yr
If yr = Date.Now.Year Then
yearborn.items(yr).Selecte d = True
End If
Next yr
End If
For yr As Integer=1850 To 2020
yearborn.items.add(yr)
yearborn.items(yr).value = yr
If yr = Date.Now.Year Then
yearborn.items(yr).Selecte
End If
Next yr
End If
sorry...
yearborn.Items.Add(yr.ToSt ring())
yearborn.Items.Add(yr.ToSt
ASKER
sorry i did not mean to. it somehow pasted it all. my bad
ASKER
Server Error in '/crownroyal' Application.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeE xception: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Source Error:
Line 7: For yr As Integer = 1850 To 2020
Line 8: yearborn.Items.Add(yr)
Line 9: yearborn.Items(yr).Value = yr
Line 10: If yr = Date.Now.Year Then
Line 11: yearborn.Items(yr).Selecte d = True
Source File: C:\Inetpub\wwwroot\JMI\cro wnroyal\De fault.aspx .vb Line: 9
--------------------------
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentOutOfRangeE
Parameter name: index
Source Error:
Line 7: For yr As Integer = 1850 To 2020
Line 8: yearborn.Items.Add(yr)
Line 9: yearborn.Items(yr).Value = yr
Line 10: If yr = Date.Now.Year Then
Line 11: yearborn.Items(yr).Selecte
Source File: C:\Inetpub\wwwroot\JMI\cro
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
lmao ty DNT
ASKER
wow u are good
well, I try
for (int i =1850;i<2021; i++)
years.add(i);
This will create an array list with all of the years from 1850 to 2020.