473,378 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Type or namespace could not be found

Hello,

As I am taking my first steps in C#.NET i wrote this but I always receive an error message.

<%@ Page Language="C#" %>

<script runat="server">
void Submit_Click(object obj, Eventargs e) {
if (tbPass.Value == "mypass") {
Session["Username"] = tbUser.value;
Response.Redirect("oefening4.aspx");
} else {
Label1.Text = "<font color=redThat is the wrong password !</font>";
}
}
</script>

<html><body>

<form runat="server">
Please enter your username and password:<p>
<input type="text" id="tbUser"
runat="server"/><br>
<p>
<asp:Button id="btSubmit"
text="Submit"
runat="server"
OnClick="Submit_click"/><p>
<asp:label id="Label1" runat="server"/>
</form>
</body></html>

Error Message =
Compiler Error Message: CS0246: The type or namespace name 'Eventargs' could not be found (are you missing a using directive or an assembly reference?)

Anybody any idea please ,

Best regards

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
Feb 7 '07 #1
2 8522
Nico Vonckx wrote in news:20****************@yahoo.com:
Error Message =
Compiler Error Message: CS0246: The type or namespace name 'Eventargs'
could not be found (are you missing a using directive or an assembly
reference?)
Maybe it is EventArgs?

/Peter
Feb 7 '07 #2
Hi Nico,

As Peter said, it is EventArgs (capital A). C# is case sensitive and
won't understand Eventargs, thinking it is a type or namspace you have
defined somewhere. Since it can't find out where it is, the compiler will
suggest a missing using directive or assembly reference.

--
Happy Coding!
Morten Wennevik [C# MVP]
Feb 7 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matthew Louden | last post by:
using System.Data; using System.Data.SqlClient; //etc... SqlConnection conn = new SqlConnection(connString); SQLDataSetCommand myCmd = new SQLDataSetCommand("select * from Test;", conn);...
3
by: Joe DeAngelo | last post by:
When I try to compile a source code which should normally run I got this error message error CS0246: The type or namespace name 'XmlSchemaSet' could not be found (are you missing a using...
4
by: Stephen Cochran | last post by:
I'm getting the following error in my ASP.NET application: Namespace or type 'DirectoryServices' for the Imports 'System.DirectoryServices' cannot be found. I have added the...
1
by: Randall Parker | last post by:
Using VS 2003 and Cassini web server. I'm new to ASP.Net and so this may be a dumb question. I'm getting an error where the type 'FarmLand.WebForm1' is not found. The Codebehind C# source file...
7
by: John Grandy | last post by:
My ASP.NET Web Service project has a Web Method that returns an array filled with instances of a custom class. The custom class is defined in a Class Library that is included in the web-service...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
4
by: carqs123 | last post by:
What is the procedure for using a class defined in the same solution but in another project? The language I am using is c-sharp. I have a solution with two projects in it. A c-sharp program in...
2
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. ...
6
by: antonyliu2002 | last post by:
Hi, guys, I am using Visual Web Developer Express 2005 for my web application. I wrote a simple class called MyTestClass.cs and put it in the App_Code folder. I compiled it to library from...
5
by: mknoll217 | last post by:
I am a newbie at XML. I have been given an xml document that I need to write the schema for, for a class assignment. The xml given to me is <?xml version="1.0"?> <Vendors> <Vendor> ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.