Hello Friends,
This might sound really stupid but I'm runnin into this problem.
I have a dropdownlist in my aspx page which uses a .vb file. I'm trying to populate the dropdownlist in the Page_Load event that I've written in the codebehind file. However, it throws me an error saying Name not declared. Following are my files. Let me know what Im doing wrong.
Thanq
Praveen
Herez the .vb file
The .aspx file
This might sound really stupid but I'm runnin into this problem.
I have a dropdownlist in my aspx page which uses a .vb file. I'm trying to populate the dropdownlist in the Page_Load event that I've written in the codebehind file. However, it throws me an error saying Name not declared. Following are my files. Let me know what Im doing wrong.
Thanq
Praveen
Herez the .vb file
Code:
Imports System
Imports System.IO
Imports System.Text
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.Page
Public Class RegisterClass:Inherits Page
Public Sub Page_Load(Sender As Object,e As System.EventArgs)
Dim i as Integer
Dim DtNow As DateTime
Dim strConnection As String
strConnection = System.Configuration.ConfigurationSettings.AppSettings("ConnectionString")
ddlDay.Items.Add("Day")
.
.
.
.
The .aspx file
Code:
<%@ Page Language="VB" src="register.aspx.vb" Inherits="RegisterClass" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<link rel="stylesheet" type="text/css" href="styles.css" /><html>
<head>
<title>Registration</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
.
.
.
.
.
.
<asp:dropdownlist ID="ddlDay" runat="server"></asp:dropdownlist>
Last edited: