Why would this code give me the error
"Could not load type System.Web.UI.W ebControls.Acce ssDataSource from
assembly System.Web, Version=1.0.500 0.0" at line 16...
<form id="form1" runat="server">
Line 15: <div>
Line 16: <asp:AccessData Source ID="AccessDataS ource1"
Runat="server" DataFile="data\ pubs.mdb"
Line 17: SelectCommand=" select * from [authors]"
Line 18: DeleteCommand=" DELETE FROM [authors] WHERE [au_id] = ?"
I heard it might be because .net framework 2.0 is not installed
properly, so I reinstalled .net 2.0 from scratch (its on a winsows 2003
server) but to no avail.
Any idea what is going on here?
<%@ Page language="C#" %>
<%@ import namespace="Syst em" %>
<%@ import namespace="Syst em.Web" %>
<%@ import namespace="Syst em.Web.UI" %>
<%@ import namespace="Syst em.Web.UI.HtmlC ontrols" %>
<%@ import namespace="Syst em.Web.UI.WebCo ntrols" %>
<%@ import namespace="Syst em.Data" %>
<%@ import namespace="Syst em.Data.OleDb" %>
<script RunAt="server">
void EmployeesGridVi ew_OnSelectedIn dexChanged(Obje ct sender, EventArgs e)
{
EmployeeDetails SqlDataSource.S electParameters["EmpID"].DefaultValue =
EmployeesGridVi ew.SelectedValu e.ToString();
EmployeeFormVie w.DataBind();
}
void EmployeeFormVie w_ItemUpdated(O bject sender,
FormViewUpdated EventArgs e)
{
EmployeesGridVi ew.DataBind();
}
void EmployeeFormVie w_ItemDeleted(O bject sender,
FormViewDeleted EventArgs e)
{
EmployeesGridVi ew.DataBind();
}
void EmployeeDetails SqlDataSource_O nInserted(Objec t sender,
SqlDataSourceSt atusEventArgs e)
{
System.Data.Com mon.DbCommand command = e.Command;
EmployeeDetails SqlDataSource.S electParameters["EmpID"].DefaultValue =
command.Paramet ers["@EmpID"].Value.ToString ();
EmployeesGridVi ew.DataBind();
EmployeeFormVie w.DataBind();
}
</script>
<html>
<body>
<form RunAt="server">
<h3>FormView Example</h3>
<table cellspacing="10 ">
<tr>
<td>
<asp:GridView ID="EmployeesGr idView"
DataSourceID="E mployeeAccessDa taSource"
AutoGenerateCol umns="false"
DataKeyNames="E mployeeID"
OnSelectedIndex Changed="Employ eesGridView_OnS electedIndexCha nged"
RunAt="Server">
<HeaderStyle backcolor="Navy "
forecolor="Whit e" />
<Columns>
<asp:ButtonFiel d Text="Details.. ."
HeaderText="Sho w<BR>Details"
CommandName="Se lect"/>
<asp:BoundFie ld DataField="Empl oyeeID"
HeaderText="Emp loyee ID"/>
<asp:BoundFie ld DataField="Last Name"
HeaderText="Las t Name"/>
<asp:BoundFie ld DataField="Firs tName"
HeaderText="Fir st Name"/>
</Columns>
</asp:GridView>
</td>
<td valign="top">
<asp:FormView ID="EmployeeFor mView"
DataSourceID="E mployeeDetailsS qlDataSource"
DataKeyNames="E mployeeID"
Gridlines="Both "
OnItemUpdated=" EmployeeFormVie w_ItemUpdated"
OnItemDeleted=" EmployeeFormVie w_ItemDeleted"
RunAt="server">
<HeaderStyle backcolor="Navy "
forecolor="Whit e"/>
<RowStyle backcolor="Whit e"/>
<EditRowStyle backcolor="Ligh tCyan"/>
<ItemTemplate >
<table>
<tr><td align=right><B> Employee ID:</B></td><td><%#
Eval("EmployeeI D") %></td></tr>
<tr><td align=right><B> First Name:</B></td<td><%#
Eval("FirstName ") %></td></tr>
<tr><td align=right><B> Last Name:</B></td <td><%#
Eval("LastName" ) %></td></tr>
<tr>
<td colspan="2">
<asp:LinkButt on ID="EditButton "
Text="Edit"
CommandName="Ed it"
RunAt="server"/>
<asp:LinkButt on ID="NewButton"
Text="New"
CommandName="Ne w"
RunAt="server"/>
<asp:LinkButt on ID="DeleteButto n"
Text="Delete"
CommandName="De lete"
RunAt="server"/>
</td>
</tr>
</table>
</ItemTemplate>
<EditItemTempla te>
<table>
<tr><td align=right><B> Employee ID:</B></td><td><%#
Eval("EmployeeI D") %></td></tr>
<tr><td align=right><B> First Name:</B></td>
<td><asp:TextBo x ID="EditFirstNa meTextBox"
Text='<%# Bind("FirstName ") %>'
RunAt="Server" /></td></tr>
<tr><td align=right><B> Last Name:</B></td>
<td><asp:TextBo x ID="EditLastNam eTextBox"
Text='<%# Bind("LastName" ) %>'
RunAt="Server" /></td></tr>
<tr>
<td colspan="2">
<asp:LinkButt on ID="UpdateButto n"
Text="Update"
CommandName="Up date"
RunAt="server"/>
<asp:LinkButt on ID="CancelUpdat eButton"
Text="Cancel"
CommandName="Ca ncel"
RunAt="server"/>
</td>
</tr>
</table>
</EditItemTemplat e>
<InsertItemTemp late>
<table>
<tr><td align=right><B> First Name:</B></td>
<td><asp:TextBo x ID="InsertFirst NameTextBox"
Text='<%# Bind("FirstName ") %>'
RunAt="Server" /></td></tr>
<tr><td align=right><B> Last Name:</B></td>
<td><asp:TextBo x ID="InsertLastN ameTextBox"
Text='<%# Bind("LastName" ) %>'
RunAt="Server" /></td></tr>
<tr>
<td colspan="2">
<asp:LinkButt on ID="InsertButto n"
Text="Insert"
CommandName="In sert"
RunAt="server"/>
<asp:LinkButt on ID="CancelInser tButton"
Text="Cancel"
CommandName="Ca ncel"
RunAt="server"/>
</td>
</tr>
</table>
</InsertItemTempl ate>
</asp:FormView>
</td>
</tr>
</table>
<asp:AccessData Source
id="EmployeeAcc essDataSource"
DataFile="~/App_Data/Northwind.mdb"
runat="server"
SelectCommand=" SELECT EmployeeID, LastName, FirstName FROM
Employees WHERE EmployeeID = @EmpID"
InsertCommand=" INSERT INTO Employees(LastN ame, FirstName)
VALUES (@LastName, @FirstName);
SELECT @EmpID = SCOPE_IDENTITY( )"
UpdateCommand=" UPDATE Employees SET LastName=@LastN ame,
FirstName=@Firs tName
WHERE EmployeeID=@Emp loyeeID"
DeleteCommand=" DELETE Employees WHERE EmployeeID=@Emp loyeeID"
ConnectionStrin g="<%$ ConnectionStrin gs:NorthwindCon nection %>"
OnInserted="Emp loyeeDetailsSql DataSource_OnIn serted"
connectionstrin g="<%$ ConnectionStrin gs:NorthwindCon nection %>"
<SelectParamete rs>
<asp:Paramete r Name="Beginning Date" Type="DateTime"
defaultValue="1/1/1997" />
<asp:Paramete r Name="Ending Date" Type="DateTime"
defaultValue="1/31/1997" />
</SelectParameter s>
</asp:AccessDataS ource>
<SelectParamete rs>
<asp:Paramete r Name="EmpID" Type="Int32" DefaultValue="0 " />
</SelectParameter s>
<InsertParamete rs>
<asp:Paramete r Name="EmpID" Direction="Outp ut" Type="Int32"
DefaultValue="0 " />
</InsertParameter s>
</asp:AccessDataS ource>
</form>
</body>
--
_______________ _______________ _______________ __
DC
"You can not reason a man out of a position he did not reach through reason"
"Don't use a big word where a diminutive one will suffice."
"A man with a watch knows what time it is. A man with two watches is
never sure." Segal's Law 0 3004 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: M |
last post by:
Hi There,
I am having lot of trouble getting out the ASP.NET "dll hell", i hope i
can find the help here. i have coded a simple page using Visual Studio
compiled it. keep on getting works on my computer but when i put this page
on the test sever online on which i have very control and can't recompile
over there. i keep on getting error could not load type "_default". Code for
the page is as follows
<!------------------------- HTML PAGE...
|
by: news.microsoft.com |
last post by:
Hi,
I've just finished developing an web site locally (ASP 1.1) which works
fine. Now that I have posted it to our server (which has 1.0 and 1.1
installed) I get the following error message when I try to navigate to the
page.
Does anyone know what the following message means?
Could not load type System.Web.UI.WebControls from assembly System.Web,
|
by: phillip |
last post by:
This is interesting, I have attached my web.config file and the
exception I have been logging. I created a library which provide data
access to a database and a control system. The library is written in
C#. I created a small .exe file to test that the library builds
propertly from configuration and that it communicates properly. This
work great in the System.Windows.Forms. However, when I use the
library in a web enviroment things...
|
by: Wolfgang Kaml |
last post by:
I am not sure if this is more of an expert question, but I am sure that they
are out there.
I'd like to setup a general application or bin directory on my Win2003.Net
Server that will hold some useful utils that more pages on that server can
use.
As an example, I have created a Page Counter class that opens an Access .mdb
file, counts the current entries for that page, and adds a new entry with
some information regarding the current...
|
by: Don Wash |
last post by:
Hi All!
I'm getting the following Error:
No DLLs has been compiled yet and nothing in the \bin directory. So it is
not the versioning problem or anything like that.
And here are the source of the files...
| |
by: Kevin R. |
last post by:
I have been ignoring this problem for a few weeks now, but it's becoming
a bit annoying not to mention unproductive. Here it goes:
I compile my project with no errors. Then after I debug/run it, I get
the runtime error noted at the end of this message. If I re-compile
(without any changes) and re-run, then my project will run OK. This
behavior is very consistent. Another words, the only way I can run an
ASP.NET application is if I...
|
by: qiang |
last post by:
Hi everyone,
Could you please take a look at an exception for ASP.NET application?
My ASP.NET application is using Infragistics WebChart control. I encounter
an exception below when deploying the application into a third-part host.
|
by: =?Utf-8?B?QWlyRHVzdGVyMTAx?= |
last post by:
Hi,
I am using the menu control on my aspx pages. Everything works fine on my
notebook but after I published my pages to the web server. I got this error.
I've installed .netframework 2.0 but this error still exist. Why?
What else am I missing?
Thanks
AD
|
by: Allan Ebdrup |
last post by:
I have a asp.net v2 website that runs fine on our development server. I have
published the website to a stage server and it runs fine, but when I publish
it to production I get the following error:
The type specified in the TypeName property of ObjectDataSource
'PositionPostingsDataSource' could not be found.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more...
|
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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: 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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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...
| | |