Friday, January 22, 2010

8:16 PM Posted by Unknown No comments
Use ScriptManager.RegisterStartupScript, when using ajax updatepanel to add javascript from codebehind.
for eg. just showing a message box, on of a button in updatepanel
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "scriptname", "var position=$('#" + Btn.ClientID + "').offset();$('#').html('Button clicked').css(position).fadeIn(2000).fadeOut(2000);", true);

can get position using position method of jquery

0 comments:

Post a Comment