Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components 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 April 29th, 2005, 01:27 PM
Registered User
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default desperate newbie lookig for help ....

I am using the Wrox book for custom controls.

I am using their examples and everything they have in their examples works just fine but if I make slight additions to the code I dont see the change I have made being reflected.

my code is as given below (the portion I made I will indicate in bold):

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

namespace TestControlNameSpace2
{
     /// <summary>
     /// Summary description for WebCustomControl1.
     /// The Client Web Form is Called TestControlClient2.aspx
     /// </summary>
     [DefaultProperty("Text"),
     ToolboxData("<{0}:TestControl2 runat=server></{0}:TestControl2>")]
     public class TestControl2 : System.Web.UI.WebControls.WebControl
     {
          private string text;
          private string message;
          private string anotherMessage;

          [Bindable(true),
          Category("Appearance"),
          DefaultValue("")]
          public string Text
          {
               get
               {
                    return text;
               }

               set
               {
                    text = value;
               }
          }
          [Bindable(true),Category("Misc")]
          public string ExMessage
          {
               get{return message;}
               set {message=value;}
          }
          [Bindable true),Category"Misc")]
public string AnotherMessage
          {
               get{return anotherMessage;}
               set{anotherMessage=value;}
          }

          /// <summary>
          /// Render this control to the output parameter specified.
          /// </summary>
          /// <param name="output"> The HTML writer to write out to </param>
          protected override void Render(HtmlTextWriter output)
          {
               output.Write(text+" "+message+" "+anotherMessage);
          }
     }
}

I hope my code is clear to understand and now for the problem ....
I added string anotherMessage and its accessor and setter method WHICH IS EXACTLY LIKE THE ExMessage method.
I basically copied the ExMessage code for AnotherMessage and in Render method I added anotherMessage as a part of the string.

It does not work.... I am surprised WHY ? I didnt do anything fancy here ... just copy paste.
Without the anotherMessage everything looks and works great !
What do you think ?
Please help me . I am a newbie and am using the Wrox book for control making "ASP.NET Server Control".

I use the VS.NET 2003 and could it be that the code in the book is focussing on v1.0 and the version I use is v1.1.

 
Old May 1st, 2005, 05:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

This sounds like a setup issue to me, rather than a 1.0 Vs 1.1 problem....

Are you sure that the code that consumes your DLL can see the latest version of it? Isn't it possible that you're always looking at the old (and out-dated) DLL instead? How do you reference your new control?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Your Funeral, My Trial by Nick Cave & the Bad Seeds (Track 1 from the album: Your Funeral...My Trial) What's This?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Desperate for an answer kase_just .NET Framework 2.0 0 October 5th, 2007 06:54 PM
PLease help me i am desperate harshasks XSLT 1 July 12th, 2007 04:11 AM
Desperate need of help... Mrarmbars BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 November 18th, 2004 06:24 PM
Simple question Desperate for help!! Raif ASP.NET 1.0 and 1.1 Basics 4 August 7th, 2004 11:55 AM
=Date() Problem - I am desperate umagrama Access VBA 4 December 5th, 2003 09:31 AM





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