Geeks With Blogs
kazim mehdi
Remove/Disable javascript when using browser's back button
SCENARIO I have page that was hosted inside the iframe and I want to redirect the parent window when a user click a button inside the child page. For that I added the following code in the Button’s click event as I have to execute some server side code before redirecting. Page.ClientScript.RegisterS... RedirectKey, string.Format(" = ‘’;", url), true); PROBLEM Above mentioned code worked great but when the user used the browser’s back ......

Posted On Friday, June 10, 2011 11:18 AM AJAX Calling Prototype based client side function on button client click.

I developed a custom control that utilizing client side functionality also. What I needed is calling client side function on clicking button.

to accomplish this we need to find the clientside object for that we use $find passing clientId of the custom web control as mentioned below.


btn.OnClientClick = string.Format("$find('{0}').add({1});", this.ClientID, ‘add’);

Posted On Friday, January 28, 2011 12:10 PM

'Table' cannot have children of type 'ListViewDataItem'
I was using System.Web.UI.WebControls.T... System.Web.UI.WebControlsTa... System.Web.UI.WebControls.T... objects inside LayoutTemplate’s InstantiateIn method that’s inherited from ITemplateas stated below:Table = new Table(); when compile got the following error on the YPOD(Yellow page of Death) 'Table' cannot have children of type 'ListViewDataItem'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information ......

Posted On Thursday, January 27, 2011 5:34 PM

Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method (Solution)
I have a Model popup from ajax control toolkit in my page.that point to a asp:panel that will going to show a close button in the top left corner. When using with update panel and lots of ajax stuff ended up getting the following javascript error in IE only , it worked perfectly in firefox Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method i searched alot on the internet for the solution, solution was there that suggest just move the button outside ......

Posted On Wednesday, January 13, 2010 3:29 AM

ASP.NET AJAX:Localization Client Side
1. Set EnableScriptGlobalization=true on the script manager <asp:ScriptManager runat="server" EnableScriptGlobalization="... /> 2. Use the Sys.CultureInfo.CurrentCulture command either inside the alert or through Firebug console to check the CultureInfo at the client side 3. use Number.parseLocale instead of pareFloat so that it get correct value according to the current culture. 4. to update the value back with current culture use localeFormat <script type="text/javascript"> function ......

Posted On Thursday, May 12, 2011 11:34 AM

execute javascript function after even after ajax call

Add add_endRequest handler to the Page request manager as followed

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(<javascript name function>);

Posted On Thursday, April 28, 2011 6:02 PM

Update ASP.Net AJAX UpdatePanel using Javascript

calling __doPostBack method with updatePanel’s client id.

function updateUpdatePanel()
__doPostBack('<%=updatePanel.ClientID %>', '');

Posted On Friday, February 11, 2011 1:18 PM

Copyright © kazim sardar mehdi | Powered by: