Hi,
My page code behind code is attached ,I am a bit confused as the VS 2005 keeps giving me the error that chklistvyes & the other controls are not declared ,despite having the runat server in the html cade of the control,
I keeps oin throwing this error can some one please help me out with this issue asap,please as I tried to figure it out many a time but in vain................. -
Partial Class CPro
-
Inherits System.Web.UI.Page
-
Dim i, nyes, nno As Integer
-
Dim OptionsY() As Integer = {1, 1, 1, 1, 1, 1}
-
Dim OptionsN() As Integer = {1, 1, 1, 1, 1, 1}
-
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
-
chklistvyes.Enabled = False
-
chklistvno.Enabled = False
-
txtcallprov.Visible = False
-
txtcallprov.BackColor = Drawing.Color.White
-
btnCopyIdv.Attributes.Add("Onclick", "javascript:HighlightAll('test2.select1')")
-
btnCopyIdv.Attributes.Add("onclick", "javascript:window.clipboardData.setData('Text', document.getElementById('" & txtcallprov.UniqueID & "').value);")
-
End Sub
-
-
Protected Sub radcustid_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles radcustid.SelectedIndexChanged
-
If Trim(radcustid.SelectedValue.ToString) = "Yes" Then
-
chklistvyes.Enabled = True
-
chklistvno.Enabled = True
-
txtcallproid.Visible = True
-
txtcallproid.Text = "XYZ"
-
txtcallproid.BackColor = Drawing.Color.Green
-
ElseIf Trim(radcustid.SelectedValue.ToString) = "No" Then
-
txtcallproid.Visible = True
-
txtcallproid.BackColor = Drawing.Color.Red
-
End If
-
End Sub
-
Protected Sub btnrefresh_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnrefresh.Click
-
Response.Redirect("Callpro.aspx")
-
End Sub
-
-
-
Protected Sub btnvcheck_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnvcheck.Click
-
Dim x
-
Dim msg, msg1, msg2, msg3, msg4, msg5 As String
-
msg = ""
-
msg1 = ""
-
msg2 = ""
-
msg3 = ""
-
msg4 = ""
-
msg5 = ""
-
For x = 0 To chklistvyes.Items.Count - 1
-
If chklistvyes.Items(i).Selected Then
-
nyes = nyes + 1
-
Else
-
nno = nno + 1
-
End If
-
i = i + 1
-
Next
-
-
If (nyes > 4) Then
-
txtcallprov.Visible = True
-
txtcallprov.Text = "XYZ"
-
txtcallprov.BackColor = Drawing.Color.Green
-
ElseIf (nyes = 4) Then
-
txtcallprov.Visible = True
-
txtcallprov.Text = "XYZ"
-
txtcallprov.BackColor = Drawing.Color.Green
-
ElseIf (nyes < 4) Then
-
txtcallprov.Visible = True
-
txtcallprov.Text = "XYZ"
-
txtcallprov.BackColor = Drawing.Color.Red
-
End If
-
-
-
End Sub
-
-
End Class
-
Please help me out asap..................
4 5584
The name of the two pages are the same, and at the top of the aspx page it has a CodeFile= property that points to the exact correct name of the code page and an Inherits property that points to the exact correct name of the class in the code page?
Are you sure you have exact capitalizations correct? Did you build the page in a funny way?
(You may have to create a new page, copy/paste everything over and then delete the original)
Did you delete the .design.vb file?
If this is a web application (as apposed to an asp.net web site)Are you sure that the namespaces matches?
For example:
In your ASP page code you would have something like: -
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="CPro.aspx.vb" Inherits="MyNamespace.CPro" %>
Where MyNamespace matches the namespace of the ASP.NET web application.
@Frinavale
Thanks for your suggestion
but the copy /pasting on a new page worked,
It is an asp.net website, but I am not a pro at what you explained , since you guys are the best at this (geniuses as I would say) ,
I was just fine as it worked by recreating a page & copy pasting the same, the errors disappeared
Thanks
Regards
Please send your html code. Have you declared runat=server in the controls
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chien Lau |
last post by:
I frequently define internal UserControl-derived classes in my WinForms
apps:
internal class MyUserControl:UserControl{
...
}
I'll often need to embed these controls in a Form, whose class...
|
by: martin |
last post by:
Hi,
I am a web page and a web user control. My web user control is placed in my
web page using the following directive
<%@ Register TagPrefix="uc1" TagName="Header"...
|
by: DocAccolade |
last post by:
I am trying to include a legacy com control (controlname.ocx) in an asp.net
application using vs 2003. I have added the control to the user control tool
box, then dragged it to the form. However,...
|
by: Raed Sawalha |
last post by:
I created a very simple user control which contains lable and drag the
control to page
<%@ Page language="c#" Codebehind="Validate.aspx.cs" AutoEventWireup="false"
Inherits="Learning.Validate"...
|
by: bill |
last post by:
I have a Repeater control in a web user control.
The web user control has a public method named PopulateRepeater which takes
an ID as an parameter and populates the repeater control based on the...
|
by: Boris Yeltsin |
last post by:
OK, on my Master Page I have a control:
<a id="hypTabAccount" href="#" runat="server">Account</a>
Now, in the code-behind (Root.master.vb) I can refer to it simply thus:
...
|
by: lanem |
last post by:
Sometimes when working on my asp.net 2.0 webpages(vb.net) in Visual Studio
2005, Intellisense in my aspx.vb code-behind file tells me that a control is
not declared even though it is on my aspx web...
|
by: tizi_de |
last post by:
Hello all,
I'm looking for a sample program in C to print out lines not to the
standard MS Dos Box but into a different control e.g. text control.
Has C the possibility to do printouts to a...
|
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...
|
by: Bronquites |
last post by:
Hi! I'm having a problem with a User Control that I want to implement in my project.
All the variables and classes are declared as Public.
My User Control has a procedure that calls the...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |