Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 January 24th, 2005, 07:26 AM
Authorized User
 
Join Date: Dec 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to NitinJoshi
Default Creating classes!!

Ok This is another one...!!!Dont Mind!!!
i have created some of the subprocedures in asp.net just for adding,deleting,etc.. onclick of a button & i'm calling these...

but there are lot of pages that includes these subprocedures..i've to write it againg & again..is there any other soln...?

like importing u r namespace <%@ Import Namespace="Mynamespace" %>
in ("mynamespace" will have all my methods body..)

that i will declare my all methods and then just decalring above statement & crating instance of that can i access all those methods?

How?

Thanx!!!
 
Old January 24th, 2005, 09:30 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Are you asking how to create a class or use the class?

To use it you could have code like: lblName.text = myClassName.GetName(txtEmail.Text)

This sends txtEmail.Text to GetName of your myClassName class and should return the name of the person provided you coded GetName to return the name.

 
Old January 24th, 2005, 10:44 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:Originally posted by NitinJoshi
 ...like importing u r namespace <%@ Import Namespace="Mynamespace" %>
in ("mynamespace" will have all my methods body..)
yes exactly,if i guessed your meaning correctly it's better for your application to have some layers for avoiding useless repetitions,also it's better to separate the codes just dealing with your datasource and your page's code from each other,
(for example check out this,also try google),
HtH.

_____________________________
Mehdi.
software engineering student.
Looking for a good job for summer 2005.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using classes seymour_glass C# 1 April 26th, 2007 10:18 PM
About Classes. wdw BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 29th, 2005 08:46 AM
Dynamically Creating Objects of Array of Classes dinkarsinha General .NET 0 January 28th, 2005 06:22 AM
Creating new objects from existing classes module0000 Beginning VB 6 3 June 17th, 2003 07:13 AM





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