Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2004, 10:17 AM
Authorized User
 
Join Date: Jun 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default In the dark with Visual Studio Cust Contls

Hi I have a problem with the Control tag <WroxUnitedMotd:MotdControl > Page 499, this control (after some difficulty compiling) is registered in the Project references.
I have added the line from the book <%@ Register TagPrefix="WroxUnitedMotd" Namespace="WroxUnited" Assembly="CustomMotdControl" %> however when I write the above tag there is no WroxUnitedMotd listed in the dropdown list and it can't be seen?


Server Error in '/WroxUnited1' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type WroxUnited.MotdControl from assembly CustomMotdControl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null.

Source Error:


Line 47: <P>You can view our upcoming matches at-a-glance via the calendar to the
Line 48: right.</P>
Line 49: <WroxUnitedMotd:MotdControl id="WuMotd" Name="Matches today" runat="server" />
Line 50: </TD>
Line 51: <TD style="WIDTH: 250px; VERTICLE-ALIGN: top">


Source File: c:\inetpub\wwwroot\WroxUnited1\Default.aspx Line: 49


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573

The following is the Default.aspx code:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Default.aspx.vb" Inherits="WroxUnited1.Wrox.DefaultCodeBehind" %>
<%Inherits="WroxUnited1.WroxUnited.CustomMotdContr ol"%> <-- (Extra to requirements but has no adverse effect)
<%@ Register TagPrefix="WroxUnited" Tagname="Navbar" Src="Navbar.ascx" %>
<%@ Register TagPrefix="WroxUnited" Tagname="Header" Src="Header.ascx" %>
<%@ Register TagPrefix="WroxUnitedMotd" Namespace="WroxUnited" Assembly="CustomMotdControl" %> <-- New line added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <title>Wrox United</title>
  <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
  <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
  <meta content="JavaScript" name="vs_defaultClientScript">
  <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
   <link id="css" href='<%=Session("SelectedCss") %>' type="text/css" rel="stylesheet" >
  </HEAD>
   <body>
    <form id="Form1" method="post" runat="server">
    <WroxUnited:Header id="HeaderControl" runat="server">
    </WroxUnited:Header>
     <table style="WIDTH: 800px">
      <tr>
       <td width="800">
        <h2>Welcome to the Wrox United Website!</h2>
       </td>
       <td width="220">
        <asp:Label id="lblRegister" runat="server">Register for email updates</asp:Label>
        <asp:TextBox id="txtEmailAddress" runat="server"></asp:TextBox>
        <asp:Button id="btnRegister" runat="server" Text="Register" Width="60px"></asp:Button>
        <asp:RegularExpressionValidator id="ValidEmail" runat="server" ErrorMessage="Please enter a valid email address"
    ControlToValidate="txtEmailAddress" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
       </td>
      </tr>
     </table>
    <table style="VERTICAL-ALIGN: top; WIDTH: 800px">
     <tr>
      <TD style="WIDTH: 177px">
       <WroxUnited:Navbar id="NavigationBar" runat="server">
       </WroxUnited:Navbar>
      </TD>
      <TD style="WIDTH: 335px; VERTICLE-ALIGN: top" width="335">
      <P>This is the home page for Wrox United Football / Soccer
         team!</P>
      <P>We hope you will have fun finding out more about the team,
         the players and our performance in the league.</P>
      <P>The bar on the left will take you to different parts of the
         site where you can read about the teams, players and chat
         to other fans, or buy exclusive merchandise!</P>
      <P>You can view our upcoming matches at-a-glance via the
         calendar to the right.</P>
    <WroxUnitedMotd:MotdControl id="WuMotd" Name="Matches today" runat="server" /> <-- Error line (not in dropdown menu)
    </TD>
    <TD style="WIDTH: 250px; VERTICLE-ALIGN: top">
     <asp:Calendar id="EventCalendar" runat="server"
           OnSelectionChanged="EventCalendar_SelectionChanged "
           OnDayRender="EventCalendar_DayRender" CssClass="calendar">
     <DayStyle CssClass="normaldate"></DayStyle>
         <OtherMonthDayStyle CssClass="othermonthdate">
         </OtherMonthDayStyle>
     </asp:Calendar>
    <P>
     <asp:Panel id="pnlFixtureDetails" Visible="False"
            Runat="server">
      <asp:Repeater id=MatchesByDateList Runat="server">
     <HeaderTemplate>
     <span style="width:110px;height:25px">Date: </span>
         <span style="width:135px;height:25px">
       <%# EventCalendar.SelectedDate.ToShortDateString %>
      </span>
     <br />
      </HeaderTemplate>
                                      <ItemTemplate>
       <span style="width:110px">Wrox Team</span>
           <span style="width:135px">
         <%# Container.DataItem("TeamName") %>
       </span>
      <br />
       <span style="width:110px">Opposing Team</span>
           <span style="width:135px">
         <%# Container.DataItem("OpponentName") %>
       </span>
      <br />
       <span style="width:110px">Venue</span>
           <span style="width:135px">
        <%# venue(Container.DataItem("OpponentLocation"), _
         Container.DataItem("Location")) %>
       </span>
       <br />
       </ItemTemplate>
                                    <SeparatorTemplate>

     </span>
    </SeparatorTemplate>

         </asp:Repeater>
     </asp:Panel></P>
    <TD>
      </tr>
    </table>
    </form>
  </body>
</HTML>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Wish I could attach an image to this textbox! A picture is worth a thousand words.
Has anyone else experienced this problem?

 
Old September 13th, 2004, 02:01 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

It's saying it can't find the DLL that you are specifying. Did you add it as a reference?

Brian
 
Old September 16th, 2004, 07:44 AM
Authorized User
 
Join Date: Jun 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Xref from thread 18964
Hi Imar, thanks for your reply.
Not so, I had first to justify to my purse holder the worth of upgrading to VS.Net before considering a book. I had placed my order for the upgrade prior to receiving an email from Wrox advertising the fourth comming publication of the book ASP.NET1.1 through Bookpool, it actually cost more from them than it would have cost had I purchased it from the local book store (because of the freight charges, also I would have had a chance to handle it and check if it suited my needs). I did not know that there was such a thing as Web Matrix and had I known that the book used this as the application means of writing the code, as other books do, I would *not* have purchased it! I would like to have changed the book at the time of receipt but Wrox were not interested. So I am wrestling with 'all this other DLL hell I got myself' as you so rightly said.
IS> Are you still having troubles with things? No page is without a problem (I have frequently been able to make adjustments to get VS to accept the code) but the error messages are not always helpful in deciding what requires changing.
I have a DataAccessCode component compiled and working OK its inclusion into the control has been problematical due to the control taking three attempts to compile with no change in content but eventually compiling, this is still subject to test if and when the control is recognised by VS for inclusion onto the Default page.
Please note it is a control that I am trying to add to the front page of Default.aspx, first using a resgister tag followed further down the page with a <WroxUnitedMotd: > tag. The function of this control is to show how to build Custom Controls (it happens to display UpComming games from the database), I have sent images of pages 498 and 499 from the book to clarify the book content relating to the comments in this topic.
Assuring you of my appreciation for any help to clarify the book content in the format of VS.

Edward.

 
Old September 16th, 2004, 07:49 AM
Authorized User
 
Join Date: Jun 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Brian, Yes the reference to the DLL has been added, but I am thinking I sould try matching the bit in the tag after the ':' to the Dll name - will get back to you.
Many thanks,

Edward

 
Old September 16th, 2004, 01:54 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Edward, what Drop Down are you referring to? The one you see in the code behind of the page?

I don't think the control will end up there. You'll have to add the control to the code behind your self, if you need programmatic access to it, like this:

Protected WithEvents WuMotd As WroxUnited.MotdControl

And even then, I believe, it doesn't end up in the DD list.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: The Mercy Seat by Nick Cave and the Bad Seeds (Track 1 from the album: Tender Prey) What's This?
 
Old September 17th, 2004, 11:38 AM
Authorized User
 
Join Date: Jun 2004
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar, thanks again for your reply, the dropdown list to which I refer is the menu which appears in the Default.aspx or any .aspx file when you type a left angle bracket '<' it lists, or prompts for, all of the tags which can be used in the .aspx page
What I was hoping for was once the 'Register TagPrefix' line was added a new item would be appear in the list.
I didn't intend to refer, in this topic, to code in the code behind page, the code listed above is headed 'The following is the Default.aspx code:' I have sent you a Word file with two screen dumps to clarify. A picture is worth a thousand words.

 
Old September 17th, 2004, 12:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Aha, I see. Visual Studio .NET does NOT support Intelli Sense (the drop downs) for custom controls.

There are some work arounds (like this one: http://www.bluevisionsoftware.com/We...msIntellisense) but even then, it doesn't work as good as normal (out of the box) Server Controls. You'll have to add some stuff to the <body> tag as well, which looks pretty messy.

So, forget about Intelli Sense in the Web form. Either type in the code directly, or wait for Visual Studio .NET 2005 ;)

Personally, I don't find it worth the trouble, so other than a bit of investigating how it works, I never bothered much with the stuff presented in the article I linked to.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Studio 2003 vs. Visual Studio 2005 eitanbarazani C# 2005 4 May 9th, 2006 01:34 AM
Visual Studio .net2003 and Visual Studio 2005 Gert Visual C++ 1 January 24th, 2006 05:10 AM
Visual studio 6 or visual studio .NET chaitannyam Visual C++ 1 November 13th, 2005 09:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.