My Opera is closing 3rd of March

Lê Tiến Tâm 's Blog

Giai tri bang may cau chuyen thoi ban oi!

Subscribe to RSS feed

ASP.net Call behind code from client

How to call a function in behind code from client?
Create a project ASP.net (I use Visual.net 2008)
1. In Default.aspx page, select Design mode. Drag a ScriptManager tool into design page and set its attribute "EnablePageMethods = true" (important).
2. Insert a Button into design page, its default id is "Button1". Set its attribute "OnClientClick = functionInClient();"
3. In html <head>..</head> tag, write a function: functionInClient(). This function will call a function in server side.

Read more...