Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to call a asp.net Serverside function from javascript function

How to call a asp.net Serverside function from javascript function

Scheduled Pinned Locked Moved ASP.NET
tutorialcsharpjavascriptasp-netdatabase
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rocky23
    wrote on last edited by
    #1

    Hi, Is it possible to call a asp.net function from javascript function.? for example, my code is like this.

    <dxe:ASPxComboBox ID="cmbmMicroCause" Width="100%" runat="server" DataSourceID="RootCauseMicroDataSource"
    TextField="name" ValueField="code" ClientInstanceName="cmbmMicroCause"
    AutoPostBack="false" >
    <ClientSideEvents SelectedIndexChanged="function(s,e){OncmbMicroCauseChanged(s);}" />
    </dxe:ASPxComboBox>

    on the selection change event of

    OncmbMicroCauseChanged()

    and clickevent of the button

    saveBusinessExpections()

    i want to call a asp.net function GetData() and FillAccountaValue() simultaneously. I can't write a Serverside event directly for this controls, if i do this operation directly in serverside control, it will filter all the data and get the records from DB and it is very time consuming and i can't use AJAX controls here too, its not allowed here. Please someone help me on this.

    P 1 Reply Last reply
    0
    • R Rocky23

      Hi, Is it possible to call a asp.net function from javascript function.? for example, my code is like this.

      <dxe:ASPxComboBox ID="cmbmMicroCause" Width="100%" runat="server" DataSourceID="RootCauseMicroDataSource"
      TextField="name" ValueField="code" ClientInstanceName="cmbmMicroCause"
      AutoPostBack="false" >
      <ClientSideEvents SelectedIndexChanged="function(s,e){OncmbMicroCauseChanged(s);}" />
      </dxe:ASPxComboBox>

      on the selection change event of

      OncmbMicroCauseChanged()

      and clickevent of the button

      saveBusinessExpections()

      i want to call a asp.net function GetData() and FillAccountaValue() simultaneously. I can't write a Serverside event directly for this controls, if i do this operation directly in serverside control, it will filter all the data and get the records from DB and it is very time consuming and i can't use AJAX controls here too, its not allowed here. Please someone help me on this.

      P Offline
      P Offline
      Parwej Ahamad
      wrote on last edited by
      #2

      Yes possible, set function attribute as Webmethod

      Parwej Ahamad

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups