Gaurav Taneja

Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.

  Home  |   Contact  |   Syndication    |   Login
  90 Posts | 0 Stories | 78 Comments | 7 Trackbacks

News




Google RankGoogle PRâ„¢ - Post your Page Rank with MyGooglePageRank.com



The content on this site represents my own personal opinions and thoughts at the time of posting, and does not reflect those of my employer's in any way.

Disclaimer:- All postings in this blog is provided "AS IS" with no warranties, and confers no rights.

Archives

Post Categories

Image Galleries

Atlas

Error

OutLook

SharePointService

Usefull Site Links

March 2008 Entries

Displays date time in 26/03/2008 09:30AM CONVERT(VARCHAR,PostedDate,... '+SUBSTRING(CONVERT(VARCHAR... ' +SUBSTRING(CONVERT( VARCHAR,getdate(),100),LEN(... change the getdate() according to your field name Below one displays the date as 26/03/2008 09:30 AM CONVERT(VARCHAR,getdate(),1... '+ left(right('0'+LTRIM(RIGHT(... ' ' + right(RIGHT('0'+LTRIM(RIGHT...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

protected void gvArtist_RowCommand(object sender, GridViewCommandEventArgs e) { int intUserGridID=0; if (e.CommandName == AdminConstantKeys.ViewGigsC... { int intHeaderMasterID = -1; GridViewRow grArtist = ((Control) (e.CommandSource)).NamingCo... as GridViewRow; //Check if command raised by DataRow or not if (grArtist.RowIndex != -1) { intUserGridID = int.Parse(gvArtist.DataKeys... [AdminConstantKeys.UserID].... Session[AdminConstantKeys.G...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

public bool CheckError() { //check error for all records strError.Append("<Result... bool blnReturnVal = true; for (int i = 0; i < dtbValidate.Rows.Count; i++) { DataRow drValidation = dtbValidate.Rows[i]; string command = drValidation["command"].ToS... # region validation check switch (command) { case "required": { if (drValidation["value"].ToSt... <= 0) { strError.Append("<Error code='" + drValidation["errCode"].ToS...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

case "time": { //Regex regExpression = new Regex(@"^(\d{2}):(\d{2})\s{... //new Regex(@"^(\d{2}):(\d{2})\s{... // ^(([1-9]{1})|([0-1][1-2])|(... Regex regExpression = new Regex(@"^(([1-9]{1})|([0-1]... if (drValidation["value"].ToSt... > 0) if (!regExpression.IsMatch(drV... { strError.Append("<Error...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

case "Time": { var re=/^(([1-9]{1})|([0-1][1-2... var charpos = objValue.value.search(re); if(objValue.value.length >= 0 && charpos < 0) { //alert(charpos); if(!strError || strError.length ==0) { strError = objValue.name; }//if //alert(strError + "\n [Error character position " + eval(charpos+1)+"]"); objErrorLbl.innerHTML = strError; return false; }//if break; } Add this Case in the article published before for the Javascript...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

/// <summary> /// Apply Java Script Validation on Form /// </summary> private void ApplyValidation() { StringBuilder strClientScript = new StringBuilder(); string strErrorMsg = string.Empty; strClientScript.Append(@" var frmvalidator = new Validator ('aspnetForm','" + btnSave.ClientID + "','','','" + lblErrorMessage.ClientID + "');"); //Apply Validation on Content Title strErrorMsg = CommonFunction.GetErrorMess... .Replace(AdminConstantKeys.... "User Name"); strClientScript.Append("frm...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

<script type="text/javascript"> var hdnPopUp=document.getElemen... %>'); if(hdnPopUp.value!='') { var PopupUrl='../Common/SelectD... window.open(PopupUrl,null,'... } var frmvalidator = new Validator('aspnetForm','<... frmvalidator.addValidation(...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Javascript file // JScript File //Rollover images code function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.l... x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_prel... for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

public bool CheckError() { //check error for all records strError.Append("<Result... bool blnReturnVal = true; for (int i = 0; i < dtbValidate.Rows.Count; i++) { DataRow drValidation = dtbValidate.Rows[i]; string command = drValidation["command"].ToS... # region validation check switch (command) { case "required": { if (drValidation["value"].ToSt... <= 0) { strError.Append("<Error code='" + drValidation["errCode"].ToS...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati