This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IE 6 doesn't support it but IE7+ does but IE7 support is bit buggy apparently. | |
| IE6 supports width as min-width anyway. Doh! | |
| _width: 200px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //<a href="javascript:void(0)" onclick="PrintElem('.panel-div')" class="btn">Print Div</a> | |
| function PrintElem(elem) | |
| { | |
| PrintPopup($(elem).html()); | |
| } | |
| function PrintPopup(data) | |
| { | |
| //Windows title in window.open itches the IE the wrong way. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Put the margin/padding required on the parent and not on the text area*/ | |
| textarea.fullwidth { | |
| -webkit-box-sizing: border-box; | |
| -moz-box-sizing: border-box; | |
| box-sizing: border-box; | |
| width: 100%; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .Center-Container { | |
| position: relative; | |
| } | |
| .Absolute-Center { | |
| width: 50%; | |
| height: 50%; | |
| overflow: auto; | |
| margin: auto; | |
| position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*<div class="Center-Container is-Table"> | |
| <div class="Table-Cell"> | |
| <div class="Center-Block"> | |
| <!-- CONTENT --> | |
| </div> | |
| </div> | |
| </div> | |
| Nick the .center-container styles from above files. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT count(email), email | |
| FROM Users | |
| GROUP BY email | |
| HAVING count(email) > 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Stop Caching - Solution 1 | |
| Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1)); | |
| Response.Cache.SetCacheability(HttpCacheability.NoCache); | |
| Response.Cache.SetNoStore(); | |
| //Solution 2 | |
| Response.AppendHeader("Cache-Control", "no-cache"); //HTTP 1.1 | |
| Response.AppendHeader("Cache-Control", "private"); // HTTP 1.1 | |
| Response.AppendHeader("Cache-Control", "no-store"); // HTTP 1.1 | |
| Response.AppendHeader("Cache-Control", "must-revalidate"); // HTTP 1.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private string GenerateRandomString() | |
| { | |
| return Path.GetRandomFileName().Substring(0, 8); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //http://stackoverflow.com/questions/275824/how-to-find-out-which-account-my-asp-net-code-is-running-under | |
| var user = System.Security.Principal.WindowsIdentity.GetCurrent().User; | |
| var userName = user.Translate(typeof (System.Security.Principal.NTAccount)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //*************** Solution 1 **************/ | |
| // http://forums.asp.net/t/1466607.aspx/1 | |
| //http://forums.asp.net/t/1383898.aspx | |
| //would return http://localhost:2013 or http://localhost:2013/ApplicationPath | |
| return string.Format("{0}://{1}{2}", | |
| HttpContext.Current.Request.Url.Scheme, | |
| HttpContext.Current.Request.ServerVariables["HTTP_HOST"], |