Return to an already open application when a user tries to open a new instance
I found this code to be useful. It does the detection and optional activation of an existing application: http://www.codeproject.com/KB/cs/cssingprocess.aspx
I found this code to be useful. It does the detection and optional activation of an existing application: http://www.codeproject.com/KB/cs/cssingprocess.aspx
Here is the code to post json effectively. The variable res is able to give you the responce to your query remember to import System.Net System.IO System.text by using Imports and then the import names to bypass expired ssl certificate check this: http://blog.jameshiggs.com/2008/05/01/c-how-to-accept-an-invalid-ssl-certificate-programmatically/ Private Function SendRequest(uri As Uri, jsonDataBytes As Byte(), contentType As String, method … Read more
So I know everyone has shown the basic client side approach, and that is fine, but I wanted to at least show a solution for handling a specific client side event on the server. Lets take a look at the code, and go over it piece by piece. Since ASP.Net TextBox does not expose a … Read more
The difference is that they DO DIFFERENT THINGS! ‘Return value’ does 2 things: 1. It sets the function return value at that point 2. It immediately exits the function No further code in the function executes! ‘Functionname = value’ does 1 thing: 1. It sets the function return value at that point Other code in … Read more
The only exception that cannot be caught directly is (a framework thrown) StackOverflowException. This makes sense, logically, as you don’t have the space in the stack to handle the exception at that point. From the docs: Starting with the .NET Framework version 2.0, a StackOverflowException object cannot be caught by a try-catch block and the … Read more
You want to add return inside OnClientClick after a function is called. Otherwise, the button will post back even if function returns false. <asp:button ID=”Button1″ runat=”server” OnClick=”Button1_Click” OnClientClick=”return checkValidation()” Text=”Submit” /> <script type=”text/javascript”> function checkValidation() { return confirm(‘Everything ok?’); } </script>
The linked comparisons are very thorough, but as far as the main differences I would note the following: C# has anonymous methodsVB has these now, too C# has the yield keyword (iterator blocks)VB11 added this VB supports implicit late binding (C# has explicit late binding now via the dynamic keyword) VB supports XML literals VB … Read more
This was the shortest way I could find to sort a DataTable without having to create any new variables. DataTable.DefaultView.Sort = “ColumnName ASC” DataTable = DataTable.DefaultView.ToTable Where: ASC – Ascending DESC – Descending ColumnName – The column you want to sort by DataTable – The table you want to sort
Use Form.ShowDialog() As Bob mentioned, you should set Form.DialogResult accordingly on your modal form.
Ways to Compare .NET Assemblies suggests Commercial: NDepend Free: JustAssembly (only shows differences in API) BitDiffer (same) Reflector Diff Add-in (which you’ve already discovered, but not available anymore) Existing compare tools like Beyond Compare (commercial) can do this by special configuration. Here’s how to do this for Beyond Compare: Go to Tools → Options Click … Read more