Posts

Conditional CSS or browser based CSS

Conditional CSS or browser based CSS 1.        Browser for CSS ·          'IE' - Internet Explorer ·          'Gecko' - Gecko based browsers (Firefox, Camino etc) ·          'Webkit' - Webkit based browsers (Safari, Chrome, Shiira etc) ·          'SafMob' - Mobile Safari (iPhone / iPod Touch) ·          'Opera' - Opera's browser ·          'IEMac' - Internet Explorer for the Mac ·          'Konq' - Konqueror ·          'IEmob' - IE mobile ·          'PSP' - Playstation Portable ·          'NetF' - Net Front 2.        Condition - arithmetic operator ·          lt - Less than ·          lte - Less than or equal to ·          eq - Equal to ·          gte - Greater than or equal to ·          gt - Greater then Example:               Conditional CSS syntax   [if IE] - Used if the browser is IE     [if  Gecko ] - Used if the browser is not  Firefox   [if IE 5]

How to refresh parent page on close of popup window by toolbar close button

How to refresh parent page on close of popup window by toolbar close button 1. Create a Page default.aspx <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <script type="text/javascript">         //Method is used for Open a Url in Popup window.         function openPopup() {             open('Default2.aspx', "Page", "status=1, width=350, height=150, top=300, left=500,location=no,resizable=yes,scrollbars=1,toolbar=no,directories=no,status=no,menubar=no");         }     </script> </head> <body>     <form id="form1" runat="server">     <a href="javascript:openPopup()">Open Popup Window</a>         </form> </body> </

Display multiple marker point on Google Map with same location or same Longitude,Latitude

 Display multiple marker point on Google Map with same location or same Longitude, Latitude <!DOCTYPE html> <html> <head>     <title>Google Map</title> <!-- For Google Map Style Sheet--> <style type="text/css">     #map_canvas     {         height: 450px;         width: 980px;     }     .infowindow     {         font-size: 12px;         width: 200px !important;         font-family: verdana;     }     @media print     {         #map_canvas         {             height: 950px;         }     } </style> <!-- For Google Map--> <script src="http://maps.google.com/maps/api/js?v=3.7&amp;sensor=false" type="text/javascript"></script> <!--downlaod the oms.min.js javascript file from https://github.com/jawj/OverlappingMarkerSpiderfier --> <script src="JS/oms.min.js" type="text/javascript"></script> <script type="text/java

Check Session Timeot for Whole Application

1. Create a BasePage.cs in App_Code  and write the following code         protected void Page_Init(object sender, EventArgs e)         {             if (Context.Session != null)             {                 if (Session.IsNewSession)                 {                     HttpCookie newSessionIdCookie = Request.Cookies["ASP.NET_SessionId"];                     if (newSessionIdCookie != null)                     {                         string newSessionIdCookieValue = newSessionIdCookie.Value;                         if (newSessionIdCookieValue != string.Empty)                         {                             //This means Session was timed Out and New Session was started                             Response.Redirect("Home.aspx");                         }                     }                 }             }         } 2. Inherit this basepage on all the aspx pages such as using System; using System.Collections.Generic; using System.Col

About CAML in Sharepoint?

What is CAML in Sharepoint? CAML is Collaborative Application Markup Language and is an XML-based query language that is used in SharePoint. CAML is used to querying, build and customize the SharePoint sites. Writing CAML Query CAML root element is < Query >. CAML query has 2 parts 1.        Sort   (For sorting use <OrderBy>)   2.         Filter   (For filter use <Where>)  Basic syntax for CAML query < [Operator]>               <FieldRef Name=’ [Title]’/><Value Type=’ [Data Type] ‘> [Value] </Value> </ [Operator]>  Operators in CAML   Logical Operators                 And                 Or Comparison Operators Eq =Equals Neq =Not equal Gt=Greater than Geq =Greater than or equal Lt =Lower than Leq =Lower than or equal too IsNull = is null IsNotNull = is not null BeginsWith=Begins with Contains=Contains BeginsWith = begins with DateRangesOverlap= compare the dates In= value of a li

Automatically Jquery close alert /dialog box

Automatically Jquery close alert /dialog box  //Add below html code into body < div id ="dialog1" title ="Alert Message" style =" display :none">     < asp : Label ID ="lblMessage" runat ="server" Text ="Record Inserted Successfully"></ asp : Label > </ div > //add below code into head < script type ="text/javascript">         function DisplayPOP() {             var mydiv = $( '#dialog1' );             mydiv.css( 'display' , 'block' );             mydiv.dialog({ autoOpen: false , height: 20, width: 300 });             mydiv.dialog( 'open' );             //send the time             AutoCloseDialogBox(3000);             return false ;         }         function AutoCloseDialogBox(WaitSeconds) {             setTimeout( function () { $( "#dialog1" ).dialog( "close" ); }, WaitSeconds

How to Encrypt and Decript web.config connection string?

How to Encrypt and Decript  web.config connection string? web.config <connectionStrings>    <add name="connection" connectionString="data source=localhost;initial catalog=test;uid=sa;pwd=abcxyz"   providerName="System.Data.SqlClient" />  </connectionStrings> Add Two Button Encrypt and Decript  in asp.net and  write the code such as    protected void btnEncript_Click(object sender, EventArgs e)     {         Configuration config = WebConfigurationManager.OpenMappedWebConfiguration(GetWebConfigMappedPath(), "/");         ConfigurationSection appSetting = config.GetSection("connectionStrings");         appSetting.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");         config.Save();       }     protected void btnDecript_Click(object sender, EventArgs e)     {         Configuration config = WebConfigurationManager.OpenMappedWebConfiguration(GetWebConfigMappedPath(), "/"