Click here to Skip to main content
15,886,199 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAlignment of brackroung gets changed in master page design view Pin
svt gdwl14-Feb-10 19:11
svt gdwl14-Feb-10 19:11 
AnswerRe: Alignment of brackroung gets changed in master page design view Pin
Abhishek Sur14-Feb-10 22:41
professionalAbhishek Sur14-Feb-10 22:41 
QuestionSEO for blogs Pin
Member 227733414-Feb-10 18:58
Member 227733414-Feb-10 18:58 
QuestionSEO for blogs Pin
Member 227733414-Feb-10 18:58
Member 227733414-Feb-10 18:58 
QuestionRetriving a particular Column value from Checked List box on Selected index Changing..... Pin
vineesh v14-Feb-10 18:57
vineesh v14-Feb-10 18:57 
AnswerRe: Retriving a particular Column value from Checked List box on Selected index Changing..... Pin
sashidhar14-Feb-10 19:12
sashidhar14-Feb-10 19:12 
QuestionOracle Session Problem Pin
AndyASPVB14-Feb-10 8:17
AndyASPVB14-Feb-10 8:17 
QuestionJavascript callbacks question !! Pin
el_scrub14-Feb-10 6:46
el_scrub14-Feb-10 6:46 
Right Im starting to look at web programming and need a bit of help.

And im starting at the deepend, I was looking at a tutorial on this site for an Ajax style chat program. In the code it uses javascript callbacks to log the user out. Wrapping my head around the way the client calls the server and the program responds was difficult and I want to see if I have this right.

These are the two java script functions I am using. The LogMeOut function get called on a button click.
function LogOutUser(result, context) {
    alert("test")
    alert(result)
}        

function LogMeOut() {
    LogOutUserCallBack();
}   


and here is how they are registered.
string callBackReference = Page.ClientScript.GetCallbackEventReference(this, "arg", "LogOutUser", "", false);
string logoutScript = "function LogOutUserCallBack(arg, context) { " + callBackReference + "; }";
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "LogOutUserCallBack", logoutScript, true);


So let me see if I have the logic for this right.

The callback reference going to create a call to the server side ICallbackEventHandler.RaiseCallbackEvent
using the client side WebForm_DoCallback function. And the LogOutUser function is the resultHandler.

The RegisterClientScriptBlock and logoutScript just add the function which wraps the WebForm_DoCallback reference to the client page.

The format for the clientCallback function has to be func(result, context).

of which the value of result is the value passed back from the server function ICallbackEventHandler.GetCallbackResult().


I think I have that figured out correctly but I have a few question remaining, as well as a problem.

I have a problem with the "alert("test")". when I run the program no alert pops up. But If I debug through it with FireBug it does ! Im fairly it get called when not debugging but not sure why the alert doesnt get called. And my breakpoint on the same line in Firebug doesnt get called !

The next question is basically my lack of understanding of the whole system and the role that WebResource and ScriptResource axd files play. Are these just two large file that the client has to download with the aspx page to get the page to run AJAX ? or how are these managed ?

I know this is a lot but I would really appreciate a bit of guidance.

Many Thanks
AnswerRe: Javascript callbacks question !! Pin
Not Active14-Feb-10 10:42
mentorNot Active14-Feb-10 10:42 
GeneralRe: Javascript callbacks question !! Pin
el_scrub14-Feb-10 11:26
el_scrub14-Feb-10 11:26 
QuestionCannot Implement Searchable Gridview in my ASP.NET Web Application Pin
Sid Childers13-Feb-10 19:55
Sid Childers13-Feb-10 19:55 
QuestionExample ASP.NET AJAX Pin
bartthefart13-Feb-10 18:51
bartthefart13-Feb-10 18:51 
AnswerRe: Example ASP.NET AJAX Pin
Not Active14-Feb-10 9:25
mentorNot Active14-Feb-10 9:25 
GeneralRe: Example ASP.NET AJAX Pin
Keith Barrow14-Feb-10 10:25
professionalKeith Barrow14-Feb-10 10:25 
GeneralRe: Example ASP.NET AJAX Pin
Not Active14-Feb-10 10:39
mentorNot Active14-Feb-10 10:39 
GeneralRe: Example ASP.NET AJAX Pin
Keith Barrow15-Feb-10 1:11
professionalKeith Barrow15-Feb-10 1:11 
Questionresolve Url and catch Query String [Solved] Pin
kasraa0009800013-Feb-10 6:00
kasraa0009800013-Feb-10 6:00 
AnswerRe: resolve Url and catch Query String Pin
Anurag Gandhi13-Feb-10 6:37
professionalAnurag Gandhi13-Feb-10 6:37 
AnswerRe: resolve Url and catch Query String Pin
Not Active13-Feb-10 7:28
mentorNot Active13-Feb-10 7:28 
AnswerRe: resolve Url and catch Query String Pin
Hesham Amin13-Feb-10 7:33
Hesham Amin13-Feb-10 7:33 
GeneralRe: resolve Url and catch Query String Pin
kasraa0009800013-Feb-10 12:32
kasraa0009800013-Feb-10 12:32 
QuestionProblem with GridView [modified] Pin
Sider8913-Feb-10 4:04
Sider8913-Feb-10 4:04 
AnswerRe: Problem with GridView Pin
Anurag Gandhi13-Feb-10 6:31
professionalAnurag Gandhi13-Feb-10 6:31 
AnswerRe: Problem with GridView Pin
Sider8914-Feb-10 2:57
Sider8914-Feb-10 2:57 
Questionproblem with uploading/downloading .docx file Pin
shankbond13-Feb-10 3:18
shankbond13-Feb-10 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.