Click here to Skip to main content
15,895,667 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: view state in asp.net Pin
Sandeep Mewara10-May-12 8:28
mveSandeep Mewara10-May-12 8:28 
GeneralRe: view state in asp.net Pin
Vipin_Arora10-May-12 18:33
Vipin_Arora10-May-12 18:33 
QuestionHow to Integrate the WebSiteAdministration Tool in Web Application Pin
lij thomas10-May-12 1:29
lij thomas10-May-12 1:29 
AnswerRe: How to Integrate the WebSiteAdministration Tool in Web Application Pin
Sandeep Mewara10-May-12 4:41
mveSandeep Mewara10-May-12 4:41 
GeneralRe: How to Integrate the WebSiteAdministration Tool in Web Application Pin
lij thomas10-May-12 23:14
lij thomas10-May-12 23:14 
AnswerRe: How to Integrate the WebSiteAdministration Tool in Web Application Pin
Syed Zoheb Ali Sumair10-May-12 10:25
Syed Zoheb Ali Sumair10-May-12 10:25 
QuestionDisposing dynamically created behaviors(extenders) within an update panel Pin
Ali Al Omairi(Abu AlHassan)10-May-12 0:17
professionalAli Al Omairi(Abu AlHassan)10-May-12 0:17 
QuestionRe: Disposing dynamically created behaviors(extenders) within an update panel Pin
Ali Al Omairi(Abu AlHassan)10-May-12 2:17
professionalAli Al Omairi(Abu AlHassan)10-May-12 2:17 
We can achieve that by by calling the function Sys.WebForms.PageRequestManager._registerDisposeScript(); which registers the the component on updating the parent UpdatePanel just like the code below:

Sys.WebForms.PageRequestManager.getInstance()._registerDisposeScript('parentupdatepanelid', 'var component = $find("componentid"); if (component != null)component.dispose()';


The disposing script(the second argument) is executed by the function Sys.WebForms.PageRequestManager._updatePanel which is called when an UpdatePanel is updated. (the code below)

JavaScript
function Sys$WebForms$PageRequestManager$_updatePanel(updatePanelElement, rendering) {
    for (var updatePanelID in this._scriptDisposes) {
        if (this._elementContains(updatePanelElement, document.getElementById(updatePanelID))) {
            var disposeScripts = this._scriptDisposes[updatePanelID];
            for (var i = 0, l = disposeScripts.length; i < l; i++) {
                eval(disposeScripts[i]);
            }
            delete this._scriptDisposes[updatePanelID];
        }
    }
    this._destroyTree(updatePanelElement);
    updatePanelElement.innerHTML = rendering;
}


I added the if statement to the disposing script because the component can be disposed before the UpdatePanel is updated so the function $find() would return a null and we would have a Null Reference Exception.

So what about the behaviors that is created after ExtenderControls on the Page that have disposing scripts of '$find("componentid").dispose();'?
Help people,so poeple can help you.


modified 11-May-12 10:33am.

GeneralRedirect to Login Page when session timeout Pin
Shirish kumar manda9-May-12 23:57
Shirish kumar manda9-May-12 23:57 
AnswerRe: Redirect to Login Page when session timeout Pin
Ali Al Omairi(Abu AlHassan)10-May-12 0:28
professionalAli Al Omairi(Abu AlHassan)10-May-12 0:28 
GeneralRe: Redirect to Login Page when session timeout Pin
Shirish kumar manda10-May-12 0:40
Shirish kumar manda10-May-12 0:40 
GeneralRe: Redirect to Login Page when session timeout Pin
Ali Al Omairi(Abu AlHassan)10-May-12 1:33
professionalAli Al Omairi(Abu AlHassan)10-May-12 1:33 
GeneralRe: Redirect to Login Page when session timeout Pin
vvashishta15-May-12 0:26
vvashishta15-May-12 0:26 
Questionimage retrive from server Pin
ajituttam9-May-12 19:42
ajituttam9-May-12 19:42 
AnswerRe: image retrive from server Pin
Aman Bhullar9-May-12 20:56
Aman Bhullar9-May-12 20:56 
Questionworking with web application Pin
sc steinhayse9-May-12 6:04
sc steinhayse9-May-12 6:04 
AnswerRe: working with web application Pin
Parwej Ahamad9-May-12 7:23
professionalParwej Ahamad9-May-12 7:23 
GeneralRe: working with web application Pin
sc steinhayse9-May-12 8:33
sc steinhayse9-May-12 8:33 
GeneralRe: working with web application Pin
Parwej Ahamad9-May-12 8:47
professionalParwej Ahamad9-May-12 8:47 
AnswerRe: working with web application Pin
Bernhard Hiller9-May-12 21:09
Bernhard Hiller9-May-12 21:09 
QuestionAsp.net(Create User Wizard) Pin
Rajaganapathy Murugan9-May-12 5:50
Rajaganapathy Murugan9-May-12 5:50 
AnswerRe: Asp.net(Create User Wizard) Pin
R. Giskard Reventlov9-May-12 6:09
R. Giskard Reventlov9-May-12 6:09 
AnswerRe: Asp.net(Create User Wizard) Pin
Sandeep Mewara9-May-12 7:29
mveSandeep Mewara9-May-12 7:29 
QuestionAdd Multiple Attachments Control Pin
Member 83405879-May-12 2:03
Member 83405879-May-12 2:03 
AnswerRe: Add Multiple Attachments Control Pin
R. Giskard Reventlov9-May-12 6:09
R. Giskard Reventlov9-May-12 6:09 

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.