Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Function Library

    In clasic asp you could have some include files that had all your common
    functions in them so you could include them in your application by <!
    Include ing them.


    Ok - Im new to asp.net -
    im wanting to construct a function library in asp.net - but i heard someone
    in the list say that that is the older way of thinking - we are now to think
    in OOP style and classes stuff.

    Help - where on the web can i read about this type of method of including
    classes into my asp.net pages...?

    Thanks.


    Chris Jackson Guest

  2. Similar Questions and Discussions

    1. Shared library / Mach-O: Application crashs if I call a function
      Hi, me again Meanwhile, I can load the shared library in my Mach-O Application and I found my function (BeepTwice) in it. But if I try to call...
    2. Calling a Managed C++ library which uses a load library function from a WS
      Good Day! Im trying to call a managed c++ library from a web service using c# but when i go trough the code the was'nt able to load the library....
    3. ~/Library/ vs ~/System/Library vs /User/Library/
      In article <110720031327074895%justin.c@se.net>, justin <justin.c@se.net> wrote: First off, you're a little bit confused. ~ means your home...
    4. [XFree86] system can't find library ( strange library behaviour )
      Hi Mark, No I hadn't tried ldconfig, but it sorted out the problem, thanks! I'd read a little bit about libraries a while ago, but could not...
    5. Shared Library, common function
      Hello, I have created a shared library, so any tool within project shared most commonly used functions. One of the functions looks like this:...
  3. #2

    Default Re: Function Library

    ASP.net pages ARE classes. New webforms are set to inherit from
    System.Web.UI.Page. However you can create your own base page and have your
    asp.net code behind classes inherit from that page. Your base page would
    include common elements(UI)/functions used by the rest of your pages
    (classes). I think you will find that you will not need as many generic
    "helper functions" as you once wrote in an asp application as the .net
    framework is rich w/ it's functionality. You can also create a class w/ a
    private constructor w/ only static methods much the same way you use :
    System.DateTime.Now :

    This is a good guide on architecture for asp.net applications.
    [url]http://msdn.microsoft.com/practices/type/Patterns/default.asp[/url]

    ~PJ

    "Chris Jackson" <someone@microsoft.com> wrote in message
    news:ePaxOdoODHA.3664@tk2msftngp13.phx.gbl...
    > In clasic asp you could have some include files that had all your common
    > functions in them so you could include them in your application by <!
    > Include ing them.
    >
    >
    > Ok - Im new to asp.net -
    > im wanting to construct a function library in asp.net - but i heard
    someone
    > in the list say that that is the older way of thinking - we are now to
    think
    > in OOP style and classes stuff.
    >
    > Help - where on the web can i read about this type of method of including
    > classes into my asp.net pages...?
    >
    > Thanks.
    >
    >

    PJ Guest

  4. #3

    Default RE: Function Library

    Hello Chris,

    I replied the question in another of your post. Just now I saw PJ's answer.
    I am not sure of whether I misunderstand your questions before.

    I agree with PJ that you could inherit a page to create an own page. The
    points here is that what you want to reuse. If it is a function library,
    such as email sending library, you could use a class library as I
    mentioned. If you want to reuse a page, you could create a base page as PJ
    suggested.

    Please feel free to post if you have any more concerns.

    Best regards,
    yhhuang
    VS.NET, Visual C++
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Got .Net? [url]http://www.gotdotnet.com[/url]
    --------------------
    !From: "Chris Jackson" <someone@microsoft.com>
    !Subject: Function Library
    !Date: Tue, 24 Jun 2003 14:30:44 -0500
    !Lines: 16
    !X-Priority: 3
    !X-MSMail-Priority: Normal
    !X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
    !X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
    !Message-ID: <ePaxOdoODHA.3664@tk2msftngp13.phx.gbl>
    !Newsgroups: microsoft.public.dotnet.framework.aspnet
    !NNTP-Posting-Host: 66.49.58.146.nw.nuvox.net 66.49.58.146
    !Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
    !Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154567
    !X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
    !
    !In clasic asp you could have some include files that had all your common
    !functions in them so you could include them in your application by <!
    !Include ing them.
    !
    !
    !Ok - Im new to asp.net -
    !im wanting to construct a function library in asp.net - but i heard someone
    !in the list say that that is the older way of thinking - we are now to
    think
    !in OOP style and classes stuff.
    !
    !Help - where on the web can i read about this type of method of including
    !classes into my asp.net pages...?
    !
    !Thanks.
    !
    !
    !

    Yan-Hong Huang[MSFT] Guest

  5. #4

    Default Re: Function Library

    ASP is procedural in nature. Therefore, you used "function libraries" as you
    describe it for storing commonly-used functions. As you have pointed out,
    ASP.Net is object-oriented. This means that you use classes instead. A class
    is basically a collection of data, functions, and executable code that are
    treated as an atomic unit, with certain characteristics shared by all parts
    of the class. It hides much of its' internal data and exposes only the data
    and functionality that is useful and safe to be accessed. Object-oriented
    programming involves a good bit more than this, however, so your request for
    a source of information is well taken.

    I would recommend downloading the free .Net SDK from Microsoft for more
    information (at least to start with). This is the most excellent software
    documentation I have ever used for any product, and it is not only a
    reference, but has many articles and samples as well. The URL for download
    is:

    [url]http://msdn.microsoft.com/library/default.asp?url=/downloads/list/netdevframework.asp[/url]

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    [url]http://www.takempis.com[/url]
    Big things are made up of
    lots of Little things.

    "Chris Jackson" <someone@microsoft.com> wrote in message
    news:ePaxOdoODHA.3664@tk2msftngp13.phx.gbl...
    > In clasic asp you could have some include files that had all your common
    > functions in them so you could include them in your application by <!
    > Include ing them.
    >
    >
    > Ok - Im new to asp.net -
    > im wanting to construct a function library in asp.net - but i heard
    someone
    > in the list say that that is the older way of thinking - we are now to
    think
    > in OOP style and classes stuff.
    >
    > Help - where on the web can i read about this type of method of including
    > classes into my asp.net pages...?
    >
    > Thanks.
    >
    >

    Kevin Spencer Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139