Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 5th, 2004, 02:22 PM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OH! YES! I see. Dank U Imar.

That clears up all manner of problems with my UserControls.

"Why are you using an abstract class for the User Control?" Because when I create a UserControl in VS.NET 1.0 it creates the abstract class in its code-behind page. Why does it do that?


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

Seriously? In Visual Studio .NET 2002?

Hmmm, strange. Didn't know that.

In 2003, I can do this:

1. Right click my project and choose Add | Add Web User Control
2. Give it a name and click OK

The Code Behind then shows

public class MyControl : System.Web.UI.UserControl

Does that behave differently for you?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old April 5th, 2004, 04:11 PM
Authorized User
 
Join Date: Nov 2003
Posts: 73
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, it does behave differently. I do exactly the same process and get an abstract class. I named the class Imar and got:
public abstract class Imar : System.Web.UI.UserControl
    {



Sandy





Similar Threads
Thread Thread Starter Forum Replies Last Post
Usercontrols yveerabhadrarao ADO.NET 1 August 3rd, 2007 06:57 AM
Javascript in UserControls chakravarthy_vb Classic ASP Components 1 March 30th, 2005 06:35 AM
Linking UserControls dhanyavnair Pro VB 6 2 December 1st, 2004 02:41 PM
Labels in DataLists shmacgregor ASP.NET 1.0 and 1.1 Basics 4 April 2nd, 2004 03:28 AM
Reusability of UserControls jara VS.NET 2002/2003 0 August 14th, 2003 05:52 PM





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