Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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
  #1 (permalink)  
Old October 13th, 2008, 12:35 PM
Authorized User
 
Join Date: May 2007
Location: Frankfurt, Germany, Germany.
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DarkForce
Default My own class in asp.net 2.0

Hi,

I am currently working on a asp.net website with sql 2005 server.

My problem is, that i want to create my own class.
When i do chose 'add new item' and then 'c# class', visual studio proposes to put the file into the App_Code folder, which i did.
Now i wrote a bit code in the class which looked like this:

namespace myNameSpace
{
    /// <summary>
    /// Summary description for Class1
    /// </summary>
    public class Class1
    {
        public Class1()
        {

        }
        public void test()
        {
        }
    }
}

Not much in there, just 2 methods. It alos works to make an object inside the masterpage.master for example like:

Class1 myClass = new Class1();

Now when i try to call a method of the class i dont get any but the usual methods like toString().

Why is that? What do i have to do, to write my own class and be able to call methods.

Thank you in advance


Ivan
__________________
Ivan
  #2 (permalink)  
Old October 13th, 2008, 12:39 PM
Authorized User
 
Join Date: May 2007
Location: Frankfurt, Germany, Germany.
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to DarkForce
Default

I am so sorry, just ignore this post.

It works.



Ivan


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error When Using Webclient class in ASP.NET sebastiansony .NET Web Services 0 June 24th, 2005 12:16 AM
Class existens in ASP.NET mega ASP.NET 1.x and 2.0 Application Design 7 November 23rd, 2004 01:30 PM
A Class in ASP.NET Maxood ASP.NET 1.0 and 1.1 Basics 12 March 25th, 2004 03:31 PM
.NET class file in ASP page shahpragnesh_p VS.NET 2002/2003 1 August 22nd, 2003 10:50 AM
Exception Handling in ASP.net class mittalpa VS.NET 2002/2003 0 July 11th, 2003 03:22 PM





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