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 1/26/2011 4:34:50 PM (Last Updated: 9/3/2013 11:26:06 AM)
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 5:06:05 PM (Last Updated: 1/2/2015 2:24:12 PM)
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 2/14/2013 5:46:58 PM 
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 9/25/2013 5:06:55 PM (Last Updated: 9/25/2013 5:07:19 PM)
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/9/2021 11:14:08 AM (Last Updated: 12/9/2021 12:07:06 PM)
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 9/25/2013 5:30:40 PM 
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 AM 
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 5/20/2009 1:49:25 PM 
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 5/10/2013 4:51:22 PM (Last Updated: 9/9/2014 5:47:31 PM)
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 3/28/2013 11:49:25 AM (Last Updated: 4/1/2015 3:47:43 PM)
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 PM (Last Updated: 10/21/2014 11:44:13 AM)
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 5/9/2013 12:27:00 PM (Last Updated: 9/9/2014 5:48:51 PM)
.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 6/21/2013 5:55:44 PM (Last Updated: 3/25/2014 6:09:01 PM)
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 3/24/2006 2:55:32 PM (Last Updated: 1/25/2010 10:58:46 PM)
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 4/27/2015 12:46:31 PM (Last Updated: 5/6/2015 8:50:13 AM)
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 8/9/2013 10:54:33 AM (Last Updated: 8/9/2013 10:54:45 AM)
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 5:38:59 PM (Last Updated: 10/16/2014 5:44:23 PM)
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 9/22/2021 3:19:55 PM 
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 3/20/2006 12:12:59 AM 
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 3/23/2016 2:49:40 PM (Last Updated: 3/23/2016 3:58:03 PM)
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 8/7/2015 10:26:49 AM (Last Updated: 8/7/2015 10:26:49 AM)
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 - amos 4/4/2022 2:46:17 PM (Last Updated: 4/4/2022 2:47:05 PM)
package.json: "angular-google-charts": "2.2.2", app.module.ts: import { GoogleChartsModule } from 'angular-google-charts'; imports: [ GoogleChartsModule, component .t
0.5
Add Placeholder Text to a .NET Login Control - amos 3/10/2015 2:56:25 PM (Last Updated: 3/10/2015 2:57:21 PM)
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 3/20/2006 12:12:59 AM 
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 Events to Controls within a Custom .NET WebControl - amos 9/24/2013 5:25:47 PM 
In a basic WebControl, you can override RenderContents to generate the look & feel of the control dynamically. Sometimes you may want to use controls within a control, such as multiple buttons. If y
0.5
1 2 3 4 5 6 7 8 9 10 ...
Page 1 of 13