How to call C# function in ASPX

Posted on 2005-04-13
Last Modified: 2008-03-10
I have 1 funcyion wtite C#. I want to call in ASP.
Help me

Thank you.
Question by:thang74us
    LVL 1

    Expert Comment

    Do you want to call it from an asp page or an aspx page ?
    This distinction is crucial
    LVL 1

    Expert Comment

    put the function in your codebehind page Ie: yourpage.aspx.cs
    then call it from the normal page Ie: <% call function(); %>
    or make you buttons runat="server" or whatever event activates it and call it from the handler also a function in the codebehind page.
    LVL 2

    Accepted Solution

    You will need to register the .NET (C#) assembly as a COM object. See here:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: CSS Specialist

    We don’t have to sell you on the idea of becoming a developer. If you’re you here, you already know it’s one of the most lucrative (and fastest growing) career tracks out there. It’s CSS that allows you to set yourself apart from other web and mobile developers.

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Accessibility and Usability are two concepts that seem to be closely related.  But, too many people seem to have a distorted perception of them. During last five years, those two words have come to the day-to-day work of almost every web develope…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to count occurrences of each item in an array.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now