Published:
05 Feb 2008
|
Abstract
In this article, Muhammad discusses the working of Callback and Controls rendering with the help of a sample application. He initially provides a short explanation of some of the important terms and then provides the steps required to accomplish the task along with both the callback server and client side codes. |
 |
by Muhammad ADnan Amanullah
Feedback
|
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days):
18470/
505
|
|
|
|
| Introduction |
In my previous article, I wrote about Callback and JSON
based JavaScript serialization which you can find here. Callback doesn't cause postback and page rendering,
neither full nor even partial. With it we can communicate with the server (IIS)
and our server side code runs there successfully and could rebind our controls
like DropDownList, GridView, ListView, DataList, Repeater, or any server side
control to which you assign data. The problem is when the page won't render, its
controls won't render, and if controls won't render then changes won't reflect.
When changes don't reflect there won't be anything at the front end to show on
the webpage.
This article is mainly about callback and rendering controls
but through this tutorial you can also learn many other things; how postbacks
work, how rendering works, how to dynamically create server-side controls, how
to create DataTables dynamically in memory to bind with, how to get server-side
controls during client-side execution and set their properties, and how to
register client-side events of server side control from the server-side code.
|
|
|
|
|
Article Feedback
User Comments
Title:
Nice Article
Name:
Saurabh Maurya
Date:
7/10/2008 2:58:04 AM
Comment:
Dear Adnan,
Its really a very good article and going to help developers to implement callbacks in their applications.
Hope to hear some more useful information in near future. Thanks a lot.
Saurabh
|
Title:
Re: KS
Name:
Author
Date:
3/18/2008 1:03:10 AM
Comment:
First of all, thanks, for your feedback, i would like to explain rendering in somehow informal way, hope you could understand. Rendering: is somehow conversion of server side code to client side code means when our code executed at web server IIS, it process that request (code) and then in response send back to browser. browser can't understand the code of asp.net, c#.net, vb.net or any server side language code, so it needs to be in that format which it could understand which is client side languages or scripts like html, xhtml, dhtml, javascript,... so in rendering process. our server side language code converted to client side language/script code and return back to browser to interpret.
in my article, i processed the dropdownlists and rendered their output in markup language format and send back to javascript code for browser to interpret.
ref: http://msdn2.microsoft.com/en-us/library/aa338806(VS.71).aspx
|
Title:
Working with Callback and Control Rendering
Name:
KS
Date:
3/17/2008 4:37:46 PM
Comment:
Could you please explain what RenderedOutput is?
|
Title:
Good One
Name:
Uzair Aziz
Date:
3/14/2008 8:17:45 AM
Comment:
Very good example,this will really helpful if somebody don't want to do programming on dropdown's SelectedIndexChanged Event handler.it is really time saving on server side.
|
Title:
Re: Bobo
Name:
Author
Date:
3/14/2008 2:53:10 AM
Comment:
Yes you are right. it should be:
scriptMgr.RegisterClientScriptBlock(this.GetType(), "CallServer", callbackScript, true);
thanks :)
|
Title:
A littlte wonder
Name:
Bobo
Date:
3/14/2008 2:47:44 AM
Comment:
Read,good,but what does "cm" mean in Listing3? it should be scriptMgr,is that correct?
|
Title:
Re: Muhammad Nadeem
Name:
Author
Date:
3/13/2008 1:55:50 PM
Comment:
surely keep you update next time sir :)
|
Title:
good work
Name:
Muhammad Nadeem
Date:
3/13/2008 10:47:23 AM
Comment:
hi man good work.. why u did not tell us..
|
Title:
Great piece of work
Name:
Dan Bambling
Date:
3/13/2008 9:37:15 AM
Comment:
This great, a real help and easy to understand. This sertainly solves having to rely on nested update pannels.
|
Title:
Excelent
Name:
aliraza
Date:
3/13/2008 8:17:38 AM
Comment:
excellent, very good article
|
Title:
Great Effort i must say.
Name:
Muhammad Moazzam Humayun
Date:
3/13/2008 5:54:21 AM
Comment:
Wow, very nice article with a superb example.
i have tested it and i love the way u have explained this technique.
:-)
Moazzam
|
Title:
Excelent!!!!!!!!!!!!!!!!!!!!!!!!
Name:
cto-Shaukat
Date:
3/13/2008 3:19:37 AM
Comment:
Excellent article ,it solved a lot of mine problem
|
Title:
Excellent!!!
Name:
Rajasekhar Bathula
Date:
3/13/2008 12:17:02 AM
Comment:
I have been searching for an like this.Finally,I got it.
Excellent one!!
|
Title:
Very Nice
Name:
Matt
Date:
3/12/2008 1:06:45 PM
Comment:
Excellent, we've been looking for somethign like this! AJAX partial-postback is just too heavy.
|
Title:
Good Article
Name:
Kauser
Date:
2/5/2008 3:45:38 PM
Comment:
You have written a very useful article. I will surely try this code. Keep it up!
|
Title:
comments?
Name:
Muhammad Adnan
Date:
2/5/2008 12:37:09 AM
Comment:
waiting for readerz comments :)
|
|
Product Spotlight
|
|
|