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

Vini

Vini's Code Help
using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressi... namespace PortalUtilities { /// <summary> /// This Class is used for Validation Check for the controls /// </summary> public class Validation { #region IsNaturalNumber Method /// <summary> /// Function to test for Positive Integers. /// </summary> /// <param name="strNumber"></pa... /// <returns></returns... public bool IsNaturalNumber(String strNumber)...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

2 Javascipt code on the pop up page//////////////////// Button1.Attributes.Add("onc... "javascript:return closeBrowser(1);"); Button2.Attributes.Add("onc... "javascript:return closeBrowser(2);"); function for closing the browser and taking the value in a hidden control function closeBrowser(val) { // alert(window.opener.documen... // window.opener.document.form... = val; if (val == 1) { window.returnValue...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

2 Javascipt code on the pop up page//////////////////// Button1.Attributes.Add("onc... "javascript:return closeBrowser(1);"); Button2.Attributes.Add("onc... "javascript:return closeBrowser(2);"); function for closing the browser and taking the value in a hidden control function closeBrowser(val) { // alert(window.opener.documen... // window.opener.document.form... = val; if (val == 1) { window.returnValue...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Javascript Function for date validation function checkDate() { var myDayStr = document.getElementById('dd... var myMonthStr = parseInt(document.getElemen... var myYearStr = document.getElementById('dd... var dteDate; dteDate=new Date(myYearStr,myMonthStr,m... var valid= ((myDayStr==dteDate.getDate()) && (myMonthStr==dteDate.getMon... && (myYearStr==dteDate.getFull... var myDateStr = myDayStr + ' ' + myMonthStr + ' ' + myYearStr;...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Javascript Function for Select All CheckBox functionality.. <script language="javascript" type="text/javascript"> function SelectAll(CheckBoxControl) { var ctrlName; if (CheckBoxControl.id=='chkAl... { ctrlName="chkLocations"; } if (CheckBoxControl.checked == true) { var i; for (i=0; i < document.forms[0].elements.... i++) { if ((document.forms[0].element... == 'checkbox') && (document.forms[0].elements... > -1) ) { var str = new String(document.forms[0].el...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Javascript Function for Closing any popup window. ASPX CODE <script language="javascript" type="text/javascript"> function GetRadWindow() { var oWindow = null; if (window.radWindow) oWindow = window.radWindow; else if (window.frameElement.radWin... oWindow = window.frameElement.radWindow; return oWindow; } function CancelEdit() { GetRadWindow().Close(); GetRadWindow().BrowserWindo... return false; } onclick="javascript: CancelEdit();" [u can use it on aspx as shown here or...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

/// <summary> /// update rights of Coverage area(Refer functionality save multiple checkbox functionality) /// </summary> /// <param name="sender"></param... /// <param name="e"></param> protected void btnCopy_Click(object sender, EventArgs e) { TerminalCatalogConfig objTerminalCatalogConfig = new TerminalCatalogConfig(); Hashtable htbParam = new Hashtable(); DataSet dsChk = new DataSet(); int LocationId; for (int iCtr = 0; iCtr < grdLocation.Items.Count; iCtr++)...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

string date(start date is 1 week later than todays date.) string sDate = DateTime.Now.Date.AddDays(-... string eDate = DateTime.Now.Date.ToShortDa
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

disabling back button public void DisableBrowserBack() { Response.Write("<script&... }...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

To check for user authentication and session expiry On POPUP PAGE Call this function on Pageload. IsUserAuthorizedinPopUp(Con... /// <summary> /// To check for user authentication and session expiry /// </summary> /// <param name="userId"></param... /// <returns></returns... public bool IsUserAuthorizedinPopUp(string userId) { bool continueFlag = false; if ((userId == "") || (userId == "0")) { RadAjaxPanel1.ResponseScrip...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Full Vini Archive