help in asp call back
-
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
-
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
-
Hi, Thanks for reply.. ok then, is there a way to call the c# script function "Highlight" from the code behind ? Thanks..
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