Posts

Donate

AjaxControlToolkit ExtenderControlBaseDesigner Class Requires T

Hello! The previous version of ExtenderControlBaseDesigner does not require T as parameter. However, in recent versions you might notice that the class is declared with T. Here's a sample declaration: AjaxControlToolkit.Design.ExtenderControlBaseDesigner<T> T means AjaxControlToolkit.ExtenderControlBase. In order for the Custom Extender Designer to work, supply the T with class that inherits the ExtenderControlBase. This sample class inherits the ExtenderControlBase: public class CustomPanelExtender : ExtenderControlBase { //your code goes here.... }

Show Smart Tag(Shift + Alt + F10) Is Disabled Or Greyed In ASP.NET Web Forms Server Control

When adding ajax extenders to asp.net server controls using Smart Tag, you often encounter an issue such as Show Smart Tag is greyed out/disabled. The best thing to do is to use the latest stable version of AjaxToolkit. And then, reset the toolbox. Sometimes, you have to close the Visual Studio IDE just to make sure. IDE Version: Visual Studio 2010 Professional Ajax Toolkit Binary: AjaxControlToolkit.Binary.NET4 (Stable Version) Cheers!

SQL Server 2012 Pre-Requisite Issue

Hi all! On a Windows 8 environment where in you have VS 2010 installed and you want to add SQL Server 2012 to your list of software, install first VS 2010 SP1 to make changes to setup configurations. Cheers!

Visual Studio 2008 Failed Install On WIndows 8 Operating System

Solution: Turn on .NET Framework 3.5 which is built-in Windows 8. Make sure windows updates is turned on also. Cheers!

Change BIOS Boot Options For Acer Aspire V5-431P/471P

Image
Hello and Good afternoon! Here's a useful Acer Aspire V5-431P/471P Tip that is to Change BIOS Boot Options for Acer Aspire V5-431P/471P (I Series) 1. Restart/Shutdown the Laptop 2. Tap F2 key on startup 3. When BIOS interface appears, go to Boot Menu 4. Change Boot Mode to Legacy BIOS. 5. Restart Again the laptop and perform step 2. 6. Set the Boot Priority of Devices using F5/F6.

SQL Server Function Date Range Example

The function below retrieves the top Freight amount specified by date range values use CompanySales IF object_id (N 'dbo.GetTopFreightValueRange' , N 'FN' ) IS NOT NULL drop function GetTopFreightValueRange go create function GetTopFreightValueRange ( @startDate nvarchar(50), @endDate nvarchar(50) ) returns decimal(10,2) as begin declare @ result varchar(50) set @ result = ( select FreightAmount from dbo.Orders where CONVERT (VARCHAR(10), ShippedDate, 120) >= @startDate and CONVERT (VARCHAR(10), ShippedDate, 120) <= @endDate ) return @ result end go -- select dbo.GetTopFreightValueRange('1996-11-01','1996-11-30') as freight_value;

SQL Server Function To Return Amount As Decimal

Here's a simple function that will return the freight amount in decimal format. use Your_Database_Name if object_id (N 'dbo.getFreightValue' , N 'FN' ) is not null drop function getFreightValue go create function getFreightValue ( @salesID nvarchar(50) ) returns decimal(10,2) as begin declare @ result varchar(50) set @ result = ( select Freight from dbo.Orders where OrderID = @salesID ) return @ result end go -- run function -- select dbo.getSomeValue(10248) as freight_value; Cheers!

Castle Windsor - Could Not Perform FindAll() For (Model) Using ActiveRecordBase in Castle.ActiveRecord ORM

When running a simple asp.net mvc project, I encountered an error which states the Model.FindAll() could not be performed. Model is a class that maps to a database table. After tracing my codes, I found out that I have mispelled the database name in my web.config as specified below: <add key= "connection.connection_string" value= "Data Source=MyComputerStation\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Blogs.mdf;Integrated Security=True;User Instance=True" /> What I did was change the database name from Blogs to Blog . That's it! :) Greg

How To Set Connection String In Properties.Settings Of ASP.NET Class Library Project

Image
Usually, we set an asp.net connection string directly in the app.config. However, we can also do it Properties.Settings. As soon as we saved the name and value, it will reflect in the app.config. Here's a sample image as reference: Cheers!

Pass By Reference Not Allowed In UI Threading Of Windows Forms In C#

The code below does not allow pass by reference to be used in UI threading particularly method Invoker. private void ShowPassMeta( ref int passedSound) { if (lblPassSoundex.InvokeRequired) { lblPassSoundex.Invoke((MethodInvoker) delegate { ShowPass( ref passedSound); }); } else { lblPassSoundex.Text = (++passedSound).ToString(); } } The solution is to store the method parameter in another variable as shown below: private void ShowPassMeta( ref int passedSound) { var passedSound1 = passedSound; if (lblPassSoundex.InvokeRequired) { lblPassSoundex.Invoke((MethodInvoker) delegate { ShowPassMeta( ref passedSound1); }); } else { lblPassSoundex.Text = (++passedSound1).ToString(); } } Cheers!

Donate