Professional Web Applications Themes

Calling c# code from javascript - ASP.NET General

Hi, Can one call a c# function from within a javascript function ? I have a c# function GetLanguageItem(title), how can I call the above function from a javascript function in an .aspx page. Thanks...

  1. #1

    Default Calling c# code from javascript

    Hi,
    Can one call a c# function from within a javascript function ? I have a c#
    function GetLanguageItem(title), how can I call the above function from a
    javascript function in an .aspx page.
    Thanks


    Anita Guest

  2. #2

    Default Re: Calling c# code from javascript

    You might be able to do what you want with Web Service behaviours, but it
    will be IE only

    --
    Regards

    John Timney (Microsoft ASP.NET MVP)
    ----------------------------------------------
    <shameless_author_plug>
    Professional .NET for Java Developers with C#
    ISBN:1-861007-91-4
    Professional Windows Forms
    ISBN: 1861005547
    Professional JSP 2nd Edition
    ISBN: 1861004958
    Professional JSP
    ISBN: 1861003625
    Beginning JSP Web Development
    ISBN: 1861002092
    </shameless_author_plug>
    ----------------------------------------------

    --
    Regards

    John Timney (Microsoft ASP.NET MVP)
    ----------------------------------------------
    <shameless_author_plug>
    Professional .NET for Java Developers with C#
    ISBN:1-861007-91-4
    Professional Windows Forms
    ISBN: 1861005547
    Professional JSP 2nd Edition
    ISBN: 1861004958
    Professional JSP
    ISBN: 1861003625
    Beginning JSP Web Development
    ISBN: 1861002092
    </shameless_author_plug>
    ----------------------------------------------

    "Anita C" <com> wrote in message
    news:ul5$phx.gbl... 
    c# 


    John Guest

  3. #3

    Default Re: Calling c# code from javascript

    Yes the code is running on the client's browser.

    "John Saunders" <com> wrote in message
    news:phx.gbl... 
    > c# [/ref]

    >
    > Is the JavaScript function running on the client's browser? If so, it[/ref]
    cannot 


    Anita Guest

  4. #4

    Default Re: Calling c# code from javascript

    start here

    http://www.webreference.com/js/column97/

    read this

    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservic
    e/overview.asp

    and see this example

    http://msdn.microsoft.com/library/default.asp?url=/workshop/author/webservic
    e/webservice.asp

    --
    Regards

    John Timney (Microsoft ASP.NET MVP)
    ----------------------------------------------
    <shameless_author_plug>
    Professional .NET for Java Developers with C#
    ISBN:1-861007-91-4
    Professional Windows Forms
    ISBN: 1861005547
    Professional JSP 2nd Edition
    ISBN: 1861004958
    Professional JSP
    ISBN: 1861003625
    Beginning JSP Web Development
    ISBN: 1861002092
    </shameless_author_plug>
    ----------------------------------------------

    "Anita C" <com> wrote in message
    news:phx.gbl... [/ref]
    it [/ref][/ref]
    a [/ref][/ref]
    from 
    > >
    > >[/ref]
    >
    >[/ref]


    John Guest

Similar Threads

  1. Calling Javascript function using MM_Menu code
    By Bay_Ridah26 in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: August 3rd, 02:43 PM
  2. Calling c# code from javascript
    By Anita C in forum ASP.NET
    Replies: 1
    Last Post: August 29th, 04:31 PM
  3. Calling code-behind function from in-line code page
    By Fred in forum ASP.NET General
    Replies: 2
    Last Post: August 26th, 04:52 PM
  4. Replies: 0
    Last Post: July 11th, 06:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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