Do a postback from javascript with ASP .NET AJAX

0 Comments

If you want to do a postback from javascript with ASP .NET AJAX and the aspx page contains a <form id="mainForm" runat="server"> , you can create and use the javascript function to do a postback

Use javascript in *.ascx user control for a Telerik RadGrid EditForm

3 Comments

If you use an *.ascx user control to add new rows to the Telerik RadGrid and want to use javascript dynamically loaded, you can use the Telerik “RadScriptBlock”: <telerik:RadScriptBlock ID="radScriptBlock" runat="server"> <script language="javascript" type="text/javascript"> alert('Hello');

Alter CSS class with javascript for usage in ASP .NET

0 Comments

To alter a CSS class with javascript, you can use the following function: // Find the first css class based on parameter [className]. function GetStyleClass(className) { // Loop all loaded css style sheets for (var

Difference between return true; and return false; in javascript

0 Comments

see: http://bytes.com/groups/javascript/89023-difference-between-return-true-return-false When you return something from a function, that value gets returned to the caller. For instance, say I had a method to multiply two numbers. Maybe the code looks like this: function multiply(num1,

undefined vs null in javascript

0 Comments

There is a difference between a varaible declarde as: var test; and a variable declared as: var test = null; The first variable has a value of undefined whereas the second variable has a value

Set text on control with javascript

0 Comments

To set the text on a control with javascript use:   /* Set the text value of the given element. This function assumes this document is defined and not null and has a function getElementById

Prevent default action arrow down and arrow up key with javascript

0 Comments

When you want to use the arrow keys to select rows in an ASP .NET 2.0 GridView, follow the steps in this article: http://www.codeproject.com/KB/webforms/GridViewRowNavigation.aspx It also explains, how you can prevent the default action of