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 5603 Plater 7,872
Recognized Expert Expert
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)
Frinavale 9,735
Recognized Expert Moderator Expert
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 is
contained in the same assembly as the control. As far as I know, the only
way to do this using the designer is to add the UserControl-derived object
|
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" Src="WebControls/Header.ascx"
%>
The web user control contains the following server controls
|
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, when i try to reference it in
code, it does not seem to exist. I declared the object variable and the ide
reports the class members. The intellisense then recognizes the child members
of the object variable and provides them in a drop down,...
|
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" %>
<%@ Register TagPrefix="uc1" TagName="GroupFilesManager"
Src="GroupFilesManager.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
|
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
parameter.
When I call PopulateRepeater from the User Control page_load event it
populates the repeater without a problem.
When I call PopulateRepeater from a procedure in the web form which contains
| |
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:
hypTabAccount.InnerText = "blah"
Now, what I want is the same in a content page that uses the Master Page. I
have a Master Type in my Content page:
|
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 page. This does not cause a
compile error b/c the control is there, but it gives me a blue underline
everywhere I refer to the control in the code-behind and says that it is not
declared. I used to occasionally have this problem in vs.net 2003,...
|
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 control instead of using the
MS Dos Box? And what control can I use for this purpose when I need to
have the most similar look to the MS Dos Box?
Every help is greatly appreciated.
|
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 'lblStatusMessage' is not declared"
If I add a declaration for it at the top of my partial class like so:
Protected lblStatusMessage As System.Web.UI.WebControls.Label
|
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 variables that are declared in the main page and calls a sub on the main page at the end of its cycle.
However on the User Control, the variables and procedure that are in the main page show up as 'Variable 'xyz' Not Declared'.... how come? Shouldn't the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |