Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home5/programz/hyperbytelabs.com/wp-content/plugins/revslider/includes/operations.class.php on line 2715

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home5/programz/hyperbytelabs.com/wp-content/plugins/revslider/includes/operations.class.php on line 2719

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /home5/programz/hyperbytelabs.com/wp-content/plugins/revslider/includes/output.class.php on line 3615
June 2021 - Hyper Byte Labs

Month

June 2021
public static void CleanExit(string reponseText = null) { if (String.IsNullOrEmpty(reponseText) == false) { HttpContext.Current.Response.Write(reponseText); } try { //Sends the response buffer HttpContext.Current.Response.Flush(); // Prevents any other content from being sent to the browser HttpContext.Current.Response.SuppressContent = true; //Directs the thread to finish, bypassing additional processing HttpContext.Current.ApplicationInstance.CompleteRequest(); //Suspends the current thread Thread.Sleep(1); } catch { } finally...
Read More
//Full URL string url = HttpContext.Current.Request.Url.ToString(); // http://localhost:1234/test/test.aspx?cool=true string url = HttpContext.Current.Request.Url.AbsoluteUri; // http://localhost:1234/test/test.aspx string path = HttpContext.Current.Request.Url.AbsolutePath; // /test/test.aspx string host = HttpContext.Current.Request.Url.Host; // localhost Here it is in a function: public enum URLType { Full, URI, Path, Host } public static string GetCurrentURL(URLType type = URLType.Full) { switch (type) { case URLType.URI: return...
Read More