You are writing a query in Management console and not able to remember the exact spelled field name?, which is most time common when we are working like is it Employee_ID or EmployeeID.. :)
no worries, here is a short cut for you.
just write query you are opting for, and select the table name and press ALT + F1. That is, all Table and Column details right in front of you!
Tuesday, October 19, 2010
Wednesday, May 19, 2010
Do You Know? [19-May-2010][037] [ASP.NET - WCF]
WCF (Windows Communication Foundation) was code named as "Indigo".
Do You Know? [19-May-2010][036] [ASP.NET - WCF Contracts]
All WCF services expose Contracts. The contract is never platform-specific and contracts describes what the service actually does. WCF defines four types of contracts:
[1] Service contracts - Describe which operations the client can perform on the service.
[2] Data contracts - Define which data types are passed to web service and which data tyes retrieved from the service.
[3] Fault contracts - Define which errors are raised by the service, and how the service handles the errors to its calling clients.
[4] Message contracts - Allow the services to interact directly with messages.
[1] Service contracts - Describe which operations the client can perform on the service.
[2] Data contracts - Define which data types are passed to web service and which data tyes retrieved from the service.
[3] Fault contracts - Define which errors are raised by the service, and how the service handles the errors to its calling clients.
[4] Message contracts - Allow the services to interact directly with messages.
Do You Know? [19-May-2010][035] [ASP.NET - WCF Transport Schemas]
WCF platform supports 5 transport schemas:
[1] http - uses http for transport, and can also use https for secure transport like - http://localhost:8001/MyService
[2] tcp - uses net.tcp for transport and typically include a port number like - net.tcp://localhost:8002/MyService
[3] ipc (named pipes) - uses net.pipe for transport - but WCF services that uses ipc as transport can only accept calls from same machine only. You need to specify machinename or localhost followed by pipe name. as - net.pipe://localhost/MyPipe
[4] msmq - uses net.msmq for transport, and its use the Microsoft Message Queue (MSMQ). as - net.msmq://localhost/MyService. Queues can be private or public. For private Queue - you need to specify the queuetype in address itself as - net.msmq://localhost/private/MyService
[5] peer network - uses net.p2p for transport, to indicate the use of the Windows peer network transport
[1] http - uses http for transport, and can also use https for secure transport like - http://localhost:8001/MyService
[2] tcp - uses net.tcp for transport and typically include a port number like - net.tcp://localhost:8002/MyService
[3] ipc (named pipes) - uses net.pipe for transport - but WCF services that uses ipc as transport can only accept calls from same machine only. You need to specify machinename or localhost followed by pipe name. as - net.pipe://localhost/MyPipe
[4] msmq - uses net.msmq for transport, and its use the Microsoft Message Queue (MSMQ). as - net.msmq://localhost/MyService. Queues can be private or public. For private Queue - you need to specify the queuetype in address itself as - net.msmq://localhost/private/MyService
[5] peer network - uses net.p2p for transport, to indicate the use of the Windows peer network transport
Tuesday, May 18, 2010
Do You Know? [18-May-2010][034] [Web Development]
A Question: Suppose you need to develop a web application for which you are not sure in which technology (java/.NET/php) of the Presentation Layer will be based on; (I mean you are still don't know what technology will be used for Presentation Layer); and you need to FOCUS on Business Layer & Data Layer (or anything else that you need to create for an n-Layered Architecture). WHAT will be your approach?
Answer is: Creating Web Service. That can be exposed to Presentation Layer which can be based on any technology. Because Web Services use Extensible Markup Language (XML) messages which is respected by any technology :)

More details on SOA (Service Oriented Architecture) @ SOA - Wiki
Answer is: Creating Web Service. That can be exposed to Presentation Layer which can be based on any technology. Because Web Services use Extensible Markup Language (XML) messages which is respected by any technology :)
More details on SOA (Service Oriented Architecture) @ SOA - Wiki
Do You Know? [18-May-2010][033] [ASP.NET - WCF]
Most of the WCF functionality is included in a single assembly called System.ServiceModel.dll, located in the System.ServiceModel namespace
Monday, May 17, 2010
Do You Know? [18-May-2010][032] [.NET 4.0 - Tuple]
A tuple (introduced in .NET 4.0) is a typed collection of fixed size. Tuples were introduced for interoperability with F# and IronPython, but can also make your code more concise.
Tuples are very easy to create:
Tuple<int, int, int, int, int> TuppleObj = Tuple.Create(2, 4, 6, 8, 10);
Individual items in the tuple can be queried with the Item property:
MultiplesOfTwo.Item2;
Tuples might contain up to seven elements; if you want to add more items, you have to pass in another tuple to the Rest parameter:
var multiples = new Tuple<int, int, int, int, int, int, int,Tuple<int,int,int>>(2, 4, 6, 8,10, 12, 14, new Tuple<int,int,int>(3,6,9));
Items in the second tuple can be accessed by querying the Rest property:
multiples.Rest.Item1;
more can be found on Tuple @ Tuple Class
Tuples are very easy to create:
Tuple<int, int, int, int, int> TuppleObj = Tuple.Create(2, 4, 6, 8, 10);
Individual items in the tuple can be queried with the Item property:
MultiplesOfTwo.Item2;
Tuples might contain up to seven elements; if you want to add more items, you have to pass in another tuple to the Rest parameter:
var multiples = new Tuple<int, int, int, int, int, int, int,Tuple<int,int,int>>(2, 4, 6, 8,10, 12, 14, new Tuple<int,int,int>(3,6,9));
Items in the second tuple can be accessed by querying the Rest property:
multiples.Rest.Item1;
more can be found on Tuple @ Tuple
Sunday, May 16, 2010
Do You Know? [17-May-2010][031] [.NET 4.0 - PreApplicationStartMethodAttribute]
if anybody would ask you which is the event that execute when an ASP.NET application get started.. correct, it is Application_Start event.
BUT, not anymore now :)
because in ASP.NET 4.0 - a new attribute "PreApplicationStartMethodAttribute" is introduced which allows you to run any code very early in the ASP.NET - like an application starts up. Yes, I mean very early, even before Application_Start.!!
find more details @ PreApplicationStartMethodAttribute
BUT, not anymore now :)
because in ASP.NET 4.0 - a new attribute "PreApplicationStartMethodAttribute" is introduced which allows you to run any code very early in the ASP.NET - like an application starts up. Yes, I mean very early, even before Application_Start.!!
find more details @ PreApplicationStartMethodAttribute
Do You Know? [17-May-2010][030] [.NET 4.0 - BuildManager.AddReferencedAssembly]
When you need to require some assembly reference in your application, you would add it via "Add Reference.." dialog which would in turn add reference entry inside section of your application's web.config file.
In ASP.NET 4.0, Another new method is added which allows you to add an assembly reference to the application’s list of referenced assemblies. This is the same thing like adding an assembly to the of web.config. It allows you to programmatically add references to assemblies that may be needed by your application.
like it! me too. Its always exciting to do something programatically/dynamically rather than increasing size of you web.config file ;)
In ASP.NET 4.0, Another new method is added which allows you to add an assembly reference to the application’s list of referenced assemblies. This is the same thing like adding an assembly to the
like it! me too. Its always exciting to do something programatically/dynamically rather than increasing size of you web.config file ;)
Friday, May 14, 2010
Do You Know? [14-May-2010][029] [ASP.NET - Web Service]
A New post has been made on "How to call/Invoke a web service without adding web reference" by generating proxy class through WSDL.exe utility @ How to call/Invoke a web service without adding web reference
Wednesday, May 12, 2010
Do You Know? [13-May-2010][028] [Framework 4.0 - Lazy<T>]
in .NET 4.0 - has introduced a new type called "Lazy".
Lazy allows you to have lazy initialization functionality. That is you can declare a variable with Lazy which saved allocating memory until the object is actually get used in your code. That is, memory will not be allocated to that variable untill that object get used in the code.
So, if you end up with never accesing your object variable of type Lazy - it will be never allocated any memory resources. :)
So useful to declare a heavy or expensive objects where you require to have good responsiveness of UI-based application.
Also, you can have ability to initialize Value type or null types with Lazy Initialization. For, example think of declaring a class of type Lazy.
Lazy
So, if you end up with never accesing your object variable of type Lazy
So useful to declare a heavy or expensive objects where you require to have good responsiveness of UI-based application.
Also, you can have ability to initialize Value type or null types with Lazy Initialization. For, example think of declaring a class of type Lazy.
Tuesday, May 11, 2010
Do You Know? [12-May-2010][027] [Visual Studio - Show code covered by intellisense]
IntelliSense is the greatest help MS provided in Visual Studio Environment.
Even IntelliSense in Visual Studio 2010 got 3 to 5 times faster then ever.
While you work in Visual Studio 2008/10 and as you write code; the IntelliSense pop-up gets come out, but if you need to view the code which is covered by the IntelliSense pop-up, you just need to press and hold the Ctrl key, and the IntelliSense pop-up becomes transparent so that you can view the code that is below the pop-up. :)
Do You Know? [11-May-2010][026] [DotNetNuke Scheduler]
A New post has been made on "How to create DotNetNuke Scheduler for executing disconnected/confinuous process" @ How to create DotNetNuke(DNN) Scheduler
Monday, May 10, 2010
Do You Know? [10-May-2010][025] [C#]
How would you rename a File in C#?
There is no dedicated method in System.IO class to rename a file (so, don't search for File.Rename :))
You need to use Move() method to rename a file with the same path as:
string strSourceFile = "c:\\New folder\\test.txt";
string strRenamedFile = "c:\\New folder\\test123.txt";
File.Move(strSourceFile,strRenamedFile);
There is no dedicated method in System.IO class to rename a file (so, don't search for File.Rename :))
You need to use Move() method to rename a file with the same path as:
string strSourceFile = "c:\\New folder\\test.txt";
string strRenamedFile = "c:\\New folder\\test123.txt";
File.Move(strSourceFile,strRenamedFile);
Saturday, May 8, 2010
Do You Know? [09-May-2010][024] [Visual Studio 2010 - Framework Targetting]
"Framework Targeting" is some feature that is already been introduced in Visual Studio 2008 where you can select the framework from "Open Dialogue.." which would be appropriate to your application.
In VS2010 the Toolbox and Properties windows are filtered to display functionality available in the targeted framework version. Previously, some properties that were not available in the targeted framework would still be exposed. VS2010 will even try to display the correct version of third-party components for the targeting framework version.
In VS2010 the Toolbox and Properties windows are filtered to display functionality available in the targeted framework version. Previously, some properties that were not available in the targeted framework would still be exposed. VS2010 will even try to display the correct version of third-party components for the targeting framework version.
Thursday, May 6, 2010
Do You Know? [06-May-2010][023] [ASP.NET - System.Net.Mail]
We use system.Net.Mail namespace to send the mail and implementing mail functionality in .NET.
Question is - Can We encrypt messages using s/mime or PGP Key when we use System.Net.Mail to send mails?
Answer is - We can't. Reason is - System.Net.Mail does not support encrypted messages.
Question is - Can We encrypt messages using s/mime or PGP Key when we use System.Net.Mail to send mails?
Answer is - We can't. Reason is - System.Net.Mail does not support encrypted messages.
Tuesday, May 4, 2010
Do You Know? [05-May-2010][022] [Visual Studio 2010 - Box Selection]
Box Selection is one of my favorite feature included in Visual Studio 2010.
This feature allows you to quickly modify many lines of code by creating a box around those line of code.
The Scenario like you need to change the access modifiers of all the members of one scope - you can use Box Selection.
To use Box Selection, you need to put the cursor where you want to make the change, and then hold down Shift + Alt + combination with the arrow keys to create a "box" where up to the line where the change need to be applied.
Finally, enter your change and it will be applied to all the selected lines.
Check out in below short video.
This feature allows you to quickly modify many lines of code by creating a box around those line of code.
The Scenario like you need to change the access modifiers of all the members of one scope - you can use Box Selection.
To use Box Selection, you need to put the cursor where you want to make the change, and then hold down Shift + Alt + combination with the arrow keys to create a "box" where up to the line where the change need to be applied.
Finally, enter your change and it will be applied to all the selected lines.
Check out in below short video.
Do You Know? [05-May-2010][021] [Visual Studio 2010 IDE]
There is a new ability/feature support is included in Visual Studio 2010 IDE.
That is - ability to drag the windows outside of IDE !!!
Yes, you can drag any docked/floating window outside of the IDE.
Even, You can drag out Code Behind or Design Windows as well (As i said any window inside IDE :)
That is - ability to drag the windows outside of IDE !!!
Yes, you can drag any docked/floating window outside of the IDE.
Even, You can drag out Code Behind or Design Windows as well (As i said any window inside IDE :)
Do You Know? [04-May-2010][020] [Visual Studio 2010]
R# & Refector are the features which are included in VS2010 IDE which are only available as Add-On Product in previous version of Visual Studio
Do You Know? [04-May-2010][019] [Visual Studio 2010 IDE]
Go Thru Tools Menu > Extension Manager.
And That will open "Extension Manager" Dialog which will show many Power Tools online to download which would enhance and improve usefulness of your IDE. They add additional functionality to various parts of your IDE. One of them is I like > PowerCommands 10.0
And That will open "Extension Manager" Dialog which will show many Power Tools online to download which would enhance and improve usefulness of your IDE. They add additional functionality to various parts of your IDE. One of them is I like > PowerCommands 10.0
Sunday, May 2, 2010
Do You Know? [02-May-2010][018] [DotNetNuke - Skinning]
The Only Building Blocks of DotNetNuke Skinning are:
[1] The HTML Page Structure which you are using/creating to create Pane Structure.
[2] The XML Tokens; If any - which are being used in the HTML Pane Structure.
[3] CSS file and Images which you are using in the HTML Page.
[4] Dottype file in which you would define correct dotcype for your skin.
[1] The HTML Page Structure which you are using/creating to create Pane Structure.
[2] The XML Tokens; If any - which are being used in the HTML Pane Structure.
[3] CSS file and Images which you are using in the HTML Page.
[4] Dottype file in which you would define correct dotcype for your skin.
Do You Know? [02-May-2010][017] [DotNetNuke - Portal Alias]
When DNN receives the first page/browser request, a look-up against the defined portal aliases (in PortalAlias table OR from Admin Menu > Site Settings) is done. If the hostname by which you have requested pages from DNN is not found in the list of portal aliases, then DNN will redirect to the first available portal alias of the first portal.
Do You Know? [02-May-2010][016] [DotNetNuke - Skinning]
The DotNetNuke Design Challenge was an amazing success! Twentyfive skins were submitted by 19 designers in 4 categories and all of their work is on display and available for you to download and use. Their work was assessed by our esteemed judges who awarded the category winners based on different attributes like design, educational value, implementation and technical merit. The Community Favorite was chosen by popular vote!
Skins available to download and use at here -
DotNetNuke Design Challenge
Skins available to download and use at here -
DotNetNuke Design Challenge
Do You Know? [02-May-2010][015] [DotNetNuke - Publish Website Option]
Theoretically - You won't use the in-built Visual Studio Publish option (Publish Website.. menu option in server explorer) to move your DotNetNuke Site to a live environment. Because that scenario is not supported.
Saturday, May 1, 2010
Do You Know? [01-May-2010][014] [SQL Server 64bit - Reading excel file in SP]
When you need to open and read an excel file in an SQL Stored Procedure (SQL Server 32 bit), you can do that via below query:
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 5.0;HDR=Yes; IMEX=1;Database=D:\TestFile\book1.xls','SELECT * FROM [sheet1$]')
But, this will only works for 32bit SQL Server installation. And it won't work for 64bit SQL Server installation. The Reason is Jet provider does not have 64bit version.
So, todo the same task/operation you need to use ACE OleDb Provider as:
SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;HDR=Yes; IMEX=1;Database=D:\TestFile\book1.xls','SELECT * FROM [sheet1$]')
Per-rquesites:
[1] You need to download latest ACE connectivity components from here: AccessDatabaseEngine.exe
[2] And Execute below query (having selcet master db):
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO
This will allow reading excel from sql server.
Help & Reference from: Nikunj Mochi (SSE)
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 5.0;HDR=Yes; IMEX=1;Database=D:\TestFile\book1.xls','SELECT * FROM [sheet1$]')
But, this will only works for 32bit SQL Server installation. And it won't work for 64bit SQL Server installation. The Reason is Jet provider does not have 64bit version.
So, todo the same task/operation you need to use ACE OleDb Provider as:
SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0','Excel 12.0;HDR=Yes; IMEX=1;Database=D:\TestFile\book1.xls','SELECT * FROM [sheet1$]')
Per-rquesites:
[1] You need to download latest ACE connectivity components from here: AccessDatabaseEngine.exe
[2] And Execute below query (having selcet master db):
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1;
GO
RECONFIGURE;
GO
This will allow reading excel from sql server.
Help & Reference from: Nikunj Mochi (SSE)
Friday, April 30, 2010
Do You Know? [01-May-2010][013] [ASP.NET - Repeater]
The Repeater control is the only Web control that allows you to split markup tags across the templates. To create a table using templates, include the begin table tag () in the HeaderTemplate, a single table row tag (
) in the FooterTemplate.
Referenced Link: Repeater Control: Split Mark-Up Tags across the Templates
Referenced Link: Repeater Control: Split Mark-Up Tags across the Templates
Thursday, April 29, 2010
Do You Know? [30-April-2010][012] [.NET - Shortcut]
Go to your Code Behind (.cs or .vb) file. > put your cursor at the Start Curly Bracket or End Curly Bracket of any code block that you have written. > and Press CTL + }
Did you see that? It will MOVE your cursor to start/end Curly Bracket of the code block. This helps you to navigate and identify start/end of any code block. Specially when you are working on some other developer's code ;)
Did you see that? It will MOVE your cursor to start/end Curly Bracket of the code block. This helps you to navigate and identify start/end of any code block. Specially when you are working on some other developer's code ;)
Do You Know? [30-April-2010][011] [ASP.NET - Profile Properties]
ASP.NET Profile Properties.
Have you ever need to store and use information that is unique to your website visitor/user?
or when user visit to your site and you can use the personalized information for that user?
or you need to recognize user when they visit again, to fetch the user information as needed?
Answer to all above Question is - To Use ASP.NET Profile Properties.
ASP.NET Profile Properties
Have you ever need to store and use information that is unique to your website visitor/user?
or when user visit to your site and you can use the personalized information for that user?
or you need to recognize user when they visit again, to fetch the user information as needed?
Answer to all above Question is - To Use ASP.NET Profile Properties.
ASP.NET Profile Properties
Do You Know? [29-April-2010][010] [DotNetNuke - 05.04.01 Release]
DotNetNuke® Community Edition - Latest stable version is out and available to download on codeplex @ DotNetNuke Release 05.04.01
Wednesday, April 28, 2010
Do You Know? [29-April-2010][009] [Visual Studio 2010 - Zooming]
"Zooming In & Out" is a newly introduced feature in Visual Studio 2010 IDE. With this option, You can Zoom In and Out Code/Text Editing window.
To Zoom In & Out > Scroll your Mouse wheel while Holding down the Control Key.
To Zoom In & Out > Scroll your Mouse wheel while Holding down the Control Key.
Do You Know? [29-April-2010][008] [C# 4.0 - Call Hierarchy]
"Call Hierarchy" is a newly introduced feature in C# 4.0 (Visual Studio 2010 IDE) which helps developer to navigate through the Calls which are made TO and FROM a selected Method, Properties or Constructors.
To View "Call Hierarchy"; Select the Method and then press "CTRL + K + T" shortcut.
To View "Call Hierarchy"; Select the Method and then press "CTRL + K + T" shortcut.
Do You Know? [29-April-2010][007] [Visual Studio 2010 - Release]
Visual Studio 2010 come in 4 different version:
[1] Professional - for individual to perform basic task
[2] Premium - for Team to develop scalable applications
[3] Test Professional - for QA to Test Plan and Manual Test Execution
[4] Ultimate - The complete ALM Tool for design, development and Deployment
[1] Professional - for individual to perform basic task
[2] Premium - for Team to develop scalable applications
[3] Test Professional - for QA to Test Plan and Manual Test Execution
[4] Ultimate - The complete ALM Tool for design, development and Deployment
Do You Know? [29-April-2010][006] [ASP.NET - Gridview]
Any Server control which is set .Visible = false will not render on the browser at all.
Similarly, If you make any GridView Column .Visible = false then it will also not render. Obviously, if you try to access the value of such column will give you error.
BUT, try this out:
GridView1.Columns[0].Visible = true;
GridView1.DataSource = YouDataSourceForGrid;
GridView1.DatBind();
GridView1.Columns[0].Visible = false;
and now try accessing value of any cell/row of First Column that we made .Visible = false; ...it WILL work :)
Similarly, If you make any GridView Column .Visible = false then it will also not render. Obviously, if you try to access the value of such column will give you error.
BUT, try this out:
GridView1.Columns[0].Visible = true;
GridView1.DataSource = YouDataSourceForGrid;
GridView1.DatBind();
GridView1.Columns[0].Visible = false;
and now try accessing value of any cell/row of First Column that we made .Visible = false; ...it WILL work :)
Do You Know? [28-April-2010][005] [DotNetNuke - Skinning]
DotNetNuke doesn't use (or say doesn't support) "App_Theme" folder at all; because It has different Skinning Architecture/Mechanism.
Do You Know? [28-April-2010][004] [DotNetNuke - KaushaL.NET]
A New post has been made on "How Would you install/configure DotNetNuke Environment" at your local machine @ How would you create a perfect DotNetNuke (DNN) Environment/Installation.
Do You Know? [28-April-2010][003] [DotNetNuke - Scheduler]
A DotNetNuke Scheduler can have 2 running modes:
[1] Request Mode - in which DotNetNuke Scheduler will execute and run each time ONLY when a Browser Request is made.
[2] Timer Mode - in which DotNetNuke Scheduler will execute and keep running behind the scene on the specified elapse time.
[1] Request Mode - in which DotNetNuke Scheduler will execute and run each time ONLY when a Browser Request is made.
[2] Timer Mode - in which DotNetNuke Scheduler will execute and keep running behind the scene on the specified elapse time.
Do You Know? [28-April-2010][002] [Visual Studio - Shortcut]
Visual Studio 2005/08/10
Open your aspx page in "Source View"
Press "CTRL + E + S"
and you would find dotted lines (that is I called "hidden characters") instead of white spaces(whereever). This is a toggle command. To remove it press the same command again.
Open your aspx page in "Source View"
Press "CTRL + E + S"
and you would find dotted lines (that is I called "hidden characters") instead of white spaces(whereever). This is a toggle command. To remove it press the same command again.
Do You Know? [28-April-2010][001] [Visual Studio 2010 UI]
The Visual Studio 2010 shiny UI/IDE is built up on WPF-based Technology.
Subscribe to:
Posts (Atom)


