Data Browser - Viewing Site  Sector 23 Code Bank Logged in as:  Guest  




   
Per Page:    Sort By:  
1 2 3 4 5 6 7 8 9 10 ...
ResultsRelevance
.NET - Create Custom Event for Class/UserControl - amos 01/26/2011 16:34:50 (Last Updated: 09/03/2013 11:26:06)
To create a custom event for your class or usercontrol: 1. Define your own delegate either within the class or in a shared library. (or use an existing .NET EventHandler) public delegate void Delet
0.5
.NET - Resize Image to Square - amos 12/11/2014 17:06:05 (Last Updated: 01/02/2015 14:24:12)
Method to resize an image so that it fits into a square: /// <summary> /// Resizes an image on disk to a square /// </summary> /// <param name="filePath&qu
0.5
.NET 4.0 Error CS0433 - amos 02/14/2013 17:46:58 
error CS0433: The type ASCX_CONTROL exists in both X and Y. I was not getting this error on my development machine, but did get it when I deployed to a web server. Issue: I had two ASCX Web Controls
0.5
.NET 4.0: Call WebService Asynchronously using JavaScript - amos 09/25/2013 17:06:55 (Last Updated: 09/25/2013 17:07:19)
You can create PageMethods on your aspx pages which can be called asynchronously using JavaScript. However, if you do the same thing on multiple pages, you would have to duplicate these methods. The
0.5
.NET 5 HttpPost Model null if too large and other issues - amos 12/09/2021 11:14:08 (Last Updated: 12/09/2021 12:07:06)
Doing HTTPPost from angualarJs to .NET 5, discovered that if the model got too large (had large lists), it came across as null. If controller was decorated with [ApiController], it returned error: Fa
0.5
.NET Change ImageUrl of HyperLink using JavaScript - amos 09/25/2013 17:30:40 
To change the ImageUrl of a HyperLink using JavaScript, you can use the following: String.Format("document.getElementById('{0}').childNodes[0].src={1};", control.ClientID, quotedUrlStringorAVariable)
0.5
.NET Core authentication error calling HttpClient with windows authentication in .NET Core - amos 11/15/2019 11:05:52 
There is a bug in .NET Core 2.1; gives an .NET Core authentication error calling HttpClient with windows authentication. Workaround seems to be: Call AppContext.SetSwitch("System.Net.Http.UseSocke
0.5
.NET Databinding: Form Visible not working - amos 05/20/2009 13:49:25 
Issue: Setting databinding of Visible property to a control such as a panel doesn't work. Solution: If your form or control the object in isn't visible at the time of the databinding, it will remain i
0.5
.NET Designer - Image Could Not Be Set On Property Error - amos 05/10/2013 16:51:22 (Last Updated: 09/09/2014 17:47:31)
If you have a custom server control with a property of type image, it takes some work to make it appear in the designer. Add these attributes to the property: [DefaultValue("")] [Ed
0.5
.NET Download Large Zip File - amos 03/28/2013 11:49:25 (Last Updated: 04/01/2015 15:47:43)
Downloading a large .zip file over .net (from stream or file path) uses up a lot of memory if you do it using Response.WriteFile/Response.WriteBytes. Manually buffering it using Response.OutputStream.
0.5
.NET Export GridView to a CSV (that Excel can Actually Read) - amos 10/16/2014 12:27:28 (Last Updated: 10/21/2014 11:44:13)
To export a gridview to CSV. Note: I am not so sure about the 1252 encoding. This allows Excel to read the text properly with my test data, but for high-register chars, you may need to do an expli
0.5
.NET Generate Local Resource adds extra properties - amos 05/09/2013 12:27:00 (Last Updated: 09/09/2014 17:48:51)
.NET "Generate Local Resource" command was adding a lot of empty/default property values to my custom server controls. For example, <my:Text runat="server"/> became <my:Te
0.5
.NET Generate Local Resource Missing Controls - amos 06/21/2013 17:55:44 (Last Updated: 03/25/2014 18:09:01)
The Generate Local Resource button on a .NET Page sometimes doesn't localize text or generate meta tags. It seems to be when: 1. Content is nested inside a repeater or other item with a content temp
0.5
.net Images: Error in GDI + - amos 03/24/2006 14:55:32 (Last Updated: 01/25/2010 22:58:46)
If you close a memory stream that was used to construct an image, you may no longer be able to access the image (such as during Save(fileName)). Instead you get a generic error in GDI+. The cause and
0.5
.NET OpenXML Find/Replace Text in Word Document - amos 04/27/2015 12:46:31 (Last Updated: 05/06/2015 08:50:13)
To find / replace text in a Word Document using the OpenXML API, four main obstacles must be overcome. 1. Delete any high level Unicode chars from your replace string that cannot be read from Word (fr
0.5
.NET set DataField or other properties of a grid column at runtime - amos 08/09/2013 10:54:33 (Last Updated: 08/09/2013 10:54:45)
In the code behind, your columns of gridviews will appear as DataControlFields, without properties that are available in the designer, such as DataField and DataFormatString. To set these in the code
0.5
.NET Upload Excel or CSV file to Server as DataSet or DataTable - amos 10/16/2014 17:38:59 (Last Updated: 10/16/2014 17:44:23)
This class will upload an xls/xlsx/csv file to the server as a datatable (user may select a sheet) or dataset (if multiple sheets). There are also some extended options if you want to get at the raw x
0.5
.NET5 Cannot Serialize DataTable - amos 09/22/2021 15:19:55 
Issue: Cannot pass type DataTable in controller to angular (serialization of System.DataType not allowed) Solution: Convert table to an object and pass that instead: IEnumerable<Dictionary<str
0.5
A Simple .ini File Reader/Writer - amos 03/20/2006 00:12:59 
Note: Depending on what you need, it may be a lot simpler to just use the Windows INI read/write utilities: [DllImport("kernel32")] private static extern long WritePrivateProfileString(string sect
0.5
Add a Print button to a page - amos 03/23/2016 14:49:40 (Last Updated: 03/23/2016 15:58:03)
To Add a Print button to a webpage: (The CSS will ensure the button is invisible when printed). Add to HTML: <button class="no-print" onclick="window.print()" style="paddi
0.5
Add existing solution to git using visual studio - amos 08/07/2015 10:26:49 (Last Updated: 08/07/2015 10:26:49)
To add a NEW solution/project to Git using the Visual Studio Git Plugin: 1. Add a new empty git repository on the remote git site: http://.... 2. Right click your solution and choose ???Add to Source
0.5
Add Google Chart to angular 11, 15, or 16 - amos 04/04/2022 14:46:17 (Last Updated: 02/23/2024 10:20:58)
Angular 11: package.json: "angular-google-charts": "2.2.2", app.module.ts: import { GoogleChartsModule } from 'angular-google-charts'; imports: [ GoogleChartsModule
0.5
Add Placeholder Text to a .NET Login Control - amos 03/10/2015 14:56:25 (Last Updated: 03/10/2015 14:57:21)
To add Placeholder Text to a .NET Login Control: 1. Declare an extension method in a control helper class /// <summary> /// Define HTML5 placeholder text on a textbox. /// Old
0.5
Add Prompt on C# Webpage - amos 03/20/2006 00:12:59 
When a user clicks a button, you probably want to confirm that they meant to click it. Especially if the button's Text is "Delete Database". Here's about the simplest check you could do: myDeleteButt
0.5
Adding Controllers to new Visual Studio 2022 Angular Project - amos 12/21/2023 16:12:25 
No new controllers seem to work except the provided WeatherController. To fix, add your new controllers to proxy.conf.js in the client app. Important: Stop any console windows running ngserve, and r
0.5
1 2 3 4 5 6 7 8 9 10 ...
Page 1 of 14