Friday, March 7, 2008

How to Enable AjaxPro to your Websiteand call ajax Method Sanjeewa sapumana

(1)//add ajax pro dll
AjaxPro.2.dll

(2)//add this codes to page load here type of=Class name
AjaxPro.Utility.RegisterTypeForAjax(typeof(PlayMedia));

(3)//Add this code top of the method
[AjaxPro.AjaxMethod()]

(4)//your method here
public void UpdateTime(string strVideoViewTimeInMinute)
{
}

(5)//Add this codes for the Web config





(6)//call your method acording event

//IN HTML call the method as this
PlayMedia.UpdateTime(videoviewTime.toString());

Thursday, March 6, 2008

javaScript Call function in every 1 sec(or any time period) Sanjeewa sapumana

//javascript
//in milisecond
var intervaltime=1000;
//Call function in every 1000 milisecond (1 sec)
state=setInterval("ProgressBarUpdate()",intervaltime);
//Finish time out
clearTimeout ( timeoutId );