Java script prototype objects properties being reset

Hi In my application i decided to have three componenet for a usercontrol 1. HTML Code 2. Code behind CS 3. Jvascript class for client manipulation I initialize the client object in Pre_render by StringBuilder initScript = new StringBuilder("var userObj= new Users();"); ScriptManager.RegisterClientScriptBlock(this, thisType, "Initialized", initScript.ToString(), true); //client class Users=function() { this.addNewDialogId=""; this.GridContextMenuId=""; } Users.prototype.AddNewUser= function () { var userAddDialog=$find(this.addNewDialogId);; } I initialize this property in the initialize event but when i try to access this again in some method value i get is null My assumption is for one instance this value should be the same throughout once set am i correct here because i get strange value on call of diffrent methods as for one method call certain properties behave as per my assumtion for others they do not. Let me know if i am doing any thing wrong here -amit
Posted On: Wednesday 7th of November 2012 10:44:46 AM Total Views:  213
View Complete with Replies