Jwalin Khatri

Archive for April 2008

Call Server side code from Client side script

Posted by: jwalin on: April 25, 2008

You can call the server side code from client side javascript. Yes, I know you can create web service(.asmx) file and call web service from Javascript but some site for little thing you have to create web service.
Instead of that you create one static method and declare as [System.Web.Services.WebMethod] then on page put the
<asp:ScriptManager ID=”ScriptManager1″ [...]

Control Extender

Posted by: jwalin on: April 16, 2008

http://steveorr.net/articles/Control-Extenders.aspx

Paging in SQL Server 2005

Posted by: jwalin on: April 15, 2008

With Microsoft SQL Server 2005, paging on the database side is simple.  There is a built-in ROW_NUMBER function designed specifically for this task.  However, versions of SQL Server prior to 2005 do not have this capability.  Below is one way to implement similar functionality in pre-2005 versions. 
SELECT TOP X * FROM RECORDS WHERE RecordID [...]

protected
 
void Button1_PreRender(object sender, EventArgs e)
{
string doubleSubmitScript = String.Format(@”if (typeof(Page_ClientValidate) == ‘function’) {{
if (!Page_ClientValidate()) {{ return false; }}
}}
this.value = ‘Please wait…’;
this.disabled = true;
{0};”

, ClientScript.GetPostBackEventReference(BeginButton, String.Empty));
Button1.OnClientClick = doubleSubmitScript;
}


Blog Stats

  • 14,744 hits

  • jwalin: Follow the following steps 1]. open you Page in NOTEPAD. 2]. find the tag 3]. Replace the "body" like body oncontextmenu=”return false;" 4]. Sav
  • cytocine: Halu , how to put that , i mean where to put the part ?? i really dont know i hope you can help me out thanks..
  • elmerdolor: Halu , how to put that , i mean where to put the part ?? i really dont know i hope you can help me out thanks..