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. help in asp call back

help in asp call back

Scheduled Pinned Locked Moved Web Development
4 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
    r_jaz
    wrote on last edited by
    #1

    Hi i'm using asp javascript call back to retrieve a text from the server and i want to highlight the keywords in the retrieved text using a highlight function written in ac# script on the client. Now i have a problem in calling the highlight function after getting control back from the server in the client script, the highlight function is never called after getting back!! here's the javasript code: function GetMessageFromServer() { CallServer(); } function ReceiveServerData(rValue) { //Label1 is a hidden label inorder to pass the // string retrieved from the server to the highlight function document.forms[0]['Label1'].Text=rValue; if(rValue!="") { //calling the highlight function <% if( ! (Label1.Text.Equals(""))) { lbl.Text=Highlight(Label1.Text,"test me please!!"); } %>; } } is there any suggestion to make that c# sript function to be executed only when the javascript function runs??? help is highly appreciated, Thanks

    L 1 Reply Last reply
    0
    • R r_jaz

      Hi i'm using asp javascript call back to retrieve a text from the server and i want to highlight the keywords in the retrieved text using a highlight function written in ac# script on the client. Now i have a problem in calling the highlight function after getting control back from the server in the client script, the highlight function is never called after getting back!! here's the javasript code: function GetMessageFromServer() { CallServer(); } function ReceiveServerData(rValue) { //Label1 is a hidden label inorder to pass the // string retrieved from the server to the highlight function document.forms[0]['Label1'].Text=rValue; if(rValue!="") { //calling the highlight function <% if( ! (Label1.Text.Equals(""))) { lbl.Text=Highlight(Label1.Text,"test me please!!"); } %>; } } is there any suggestion to make that c# sript function to be executed only when the javascript function runs??? help is highly appreciated, Thanks

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      ASP.NET executes on the Server, not in the client browser.

      led mike

      R 1 Reply Last reply
      0
      • L led mike

        ASP.NET executes on the Server, not in the client browser.

        led mike

        R Offline
        R Offline
        r_jaz
        wrote on last edited by
        #3

        Hi, Thanks for reply.. ok then, is there a way to call the c# script function "Highlight" from the code behind ? Thanks..

        L 1 Reply Last reply
        0
        • R r_jaz

          Hi, Thanks for reply.. ok then, is there a way to call the c# script function "Highlight" from the code behind ? Thanks..

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          r_jaz wrote:

          is there a way to call the c# script function "Highlight" from the code behind ?

          There is no "Highlight" function, you have "inline" server code. It will always be executed anytime the ASP.NET page is executed on the server. Based on your posts in this thread you might need to drop back to Student mode and study how Web development using Server side code execution works. Having a clear understanding of fundamental concepts is key to being a capable developer.

          led mike

          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