Jump to content

...ambiguous in the namespace 'ASP'...


Recommended Posts

I am getting the error:

'gettoknow_ascx' is ambiguous in the namespace 'ASP'

The error shows up on the line in red below.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="home.aspx.vb" Inherits="_Default" %>

Everything was working fine with my site. I had run it multiple times and I made one change to another user control called newsWire.ascx and then this error started popping up. I have removed and reinputted the ascx control multiple times, but the page wont compile with it in the page.

Anyone have any ideas of where I can start looking?

Thanks

Cavall

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="home.aspx.vb" Inherits="_Default" %>


<%@ Register Src="getToKnow.ascx" TagName="getToKnow" TagPrefix="uc7" %>

<%@ Register Src="siteMap.ascx" TagName="siteMap" TagPrefix="uc6" %>

<%@ Register Src="newMenu.ascx" TagName="newMenu" TagPrefix="uc5" %>

<%@ Register Src="menu.ascx" TagName="menu" TagPrefix="uc3" %>

<%@ Register Src="newsWire.ascx" TagName="newsWire" TagPrefix="uc2" %>

<%@ Register Src="boardMessage.ascx" TagName="boardMessage" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
<title>Untitled Page</title>
<LINK href="CSS/intranetMain.css" type="text/css" rel="stylesheet">
</head>
<body><form runat=server>
<div id="mainwrapper">
<div id="header" align=right>
</div>

<div id="listmenu">
<uc5:newMenu ID="NewMenu1" runat="server" />
</div>
<div id="threecolwrap"><!--holds the left col background-->
<!--end of twocolwrap-->
<!--start of rightcolumn div-->
<!--end of rightcolumn div--></div> <!--end of threecolwrap div-->

<div id="twocolwrap"><!-- encloses the left and center columns-->
<!--<div id="leftcolumn" style="height: 1500px">
<p>Login Box Here</p>
<p>Login | Logout</p>

</div>-->
<div id="contentNoLeftMargin"><!-- the center column --> <!--start of page content-->
<uc1:boardMessage ID="BoardMessage1" runat="server"/>
<uc2:newsWire ID="NewsWire1" runat="server" />
<uc7:getToKnow ID="getToKnow1" runat=server></uc7:getToKnow>
</div> <!--end of content div-->


</div>
<div id="footer">
<ul>
<li>
© 2006 - Waters Truck & Tractor Co., Inc.
</li>
</ul>
</div> <!--end footer --></div> <!--end mainwrapper-->
</form>
</body>
</html>

This is the control I made the change in:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="newsWire.ascx.vb" Inherits="newsWire" %>
<!--<div style="BACKGROUND-COLOR: #cccccc; border-right: black thick double; border-top: black thick double; border-left: black thick double; border-bottom: black thick double;">-->
<div id="subDiv">
<div id="subHeader"><pre class="newsFont">Newswire...</pre></div>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id" BorderWidth="0px"
DataSourceID="AccessDataSource1" EmptyDataText="There are no data records to display." ShowHeader="false" ShowFooter="False">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table>
<tr><td style="font-size:medium; font-weight:bold;"><%#Container.dataitem("title")%></td></tr>
<tr><td style="font-size:x-small;"><%#Container.dataitem("newsDate")%></td></tr>
<tr><td style="font-size:small; font-style:italic;">By: <%#Container.DataItem("author")%></td></tr>
<tr>
<td style="font-size:x-small;"><%#Container.DataItem("body")%></td>
</tr>
</table>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle/>
<HeaderStyle/>
<FooterStyle/>
</asp:GridView>
<p>Click <a href=news.aspx>here</a> to view all the company news...</p>
</div> <!-- subDiv -->
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="App_Data\watersintranet.mdb"
DeleteCommand="DELETE FROM `news` WHERE `id` = ?" InsertCommand="INSERT INTO `news` (`id`, `inputDate`, `newsDate`, `title`, `author`, `body`) VALUES (?, ?, ?, ?, ?, ?)"
SelectCommand="SELECT TOP 1 news.*
FROM news
WHERE (((news.newsDate)>=Now()))
ORDER BY news.newsDate;"
UpdateCommand="UPDATE `news` SET `inputDate` = ?, `newsDate` = ?, `title` = ?, `author` = ?, `body` = ? WHERE `id` = ?">
<InsertParameters>
<asp:Parameter Name="id" Type="Int32" />
<asp:Parameter Name="inputDate" Type="DateTime" />
<asp:Parameter Name="newsDate" Type="DateTime" />
<asp:Parameter Name="title" Type="String" />
<asp:Parameter Name="author" Type="String" />
<asp:Parameter Name="body" Type="String" />
</InsertParameters>
<DeleteParameters>
<asp:Parameter Name="id" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="inputDate" Type="DateTime" />
<asp:Parameter Name="newsDate" Type="DateTime" />
<asp:Parameter Name="title" Type="String" />
<asp:Parameter Name="author" Type="String" />
<asp:Parameter Name="body" Type="String" />
<asp:Parameter Name="id" Type="Int32" />
</UpdateParameters>
</asp:AccessDataSource>

This is the ascx control code that is messing up the page:

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="getToKnow.ascx.vb" Inherits="getToKnow" %>
<div id="subDiv">
<div id="subHeader"><pre class="gettoknowFont">Get To Know...</pre></div>
<table>
<tr>
<td><img src="Images/People/MikeHeadshot.jpg" /></td>
</tr>
</table>

<h2>George Hern</h2>
<h3>Title: <u>Fleet Salesman</u></h3>
<h3>Branch: Columbus</h3>
<h3>About Me:</h3>
<p>George is a salesman in Columbus. He has worked with the company for 10 years.</p>
<p>His wife's name is Karen and he has two little girls.</p>
</div>

Link to comment
Share on other sites

  • 1 month later...

I don't know exactly, but you may rename the function, with no possible conflicts, like very uniquely worded, and check to see if this is not a server issue, as asp.net and asp, have diffs. go to an ASP programming site, or here, as a general question

http://www.xtremevbtalk.com/ the ambiguity err makes me think syntax, or a 'gotcha' condition,

luck good

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy