Entries from December 2006

Learning ASP.Net AJAX (2)

December 8th, 2006 · No Comments

After letting ASP.Net Web Administration configured my web.config. I received “sys is undefined” error on the page whenever there is AJAX control on the page. There is nothing wrong with the code. All you need to do is to ensure the following statements exist in web.config:
<location path=”ScriptResource.axd”>
<system.web>
<authorization>
<allow users=”*”/>
</authorization>
</system.web>
</location>
<add verb=”GET” path=”ScriptResource.axd” type=”Microsoft.Web.Handlers.ScriptResourceHandler” validate=”false”/#62
Here is the related [...]

[Read more →]

Tags: Programming

How to call a JavaScript function when asp:button is clicked

December 8th, 2006 · No Comments

Create an asp:button namely “button1″.
On codebehind page, add the following:
private void Page_Load(object sender, System.EventArgs e)
{
button1.Attributes.Add(“onclick”, “jsFunc()”);
}
in which “jsFunc” is the JavaScript function you define in aspx page. With this, whenever button1 is clicked, “jsFunc” is called at client side.

[Read more →]

Tags: Programming

© 2006–2009 Now Eating — Sitemap