Pages

Tuesday 19 June 2012

Add years(data) in Dropdownlist in .cs page

Add years(data) in Dropdownlist in .cs page


#region BINDYEAR

    private void BINDYEAR()
    {
        try
        {
            int A = 1930;
            for (int i = 0; i < 64; i++)
            {
                ListItem LI = new ListItem();
                LI.Text = Convert.ToInt16(A).ToString();
                LI.Value = A.ToString();
                A = A + 1;
                DropDownList1.Items.Add(LI);
            }
            DropDownList1.Items.Insert(0, "YYYY");

        }
        catch (Exception errmsg)
        {
            Response.Write(errmsg.Message.ToString());
        }
    }
    #endregion

Short cut key in asp.net


Short cut key in asp.net

File
1. New Project (Ctrl+Shift+N )
2. Open Project/Solution (Ctrl+Shift+O)
3. Open File (Ctrl+O)
4. Save (Ctrl+S)
5. Save As (Ctrl+Shift+S)
6. Print (Ctrl+P)
 
Edit
7. Undo (Ctrl+Z)
8. Redo (Ctrl+Y)
 
9. Cut (Ctrl+X)
10. Copy (Ctrl+C)
11. Paste (Ctrl+V)
12. Cycle Clipboard Ring (Ctrl+Shift+V)
13. Select All (Ctrl+A)
14. Quick Find (Ctrl+F)
 
15. Quick Replace (Ctrl+H)
16. Find in Files (Ctrl+Shift+F)
17. Replace in Files (Ctrl+Shift+H)
18. Find Symbol (Alt+F12)
 
19. Format Document (Ctrl+E,D)
20. Format Selection (Ctrl+E,F)
21. Make Uppercase (Ctrl+Shift+U)
22. Make Lowercase (Ctrl+U)
23. Delete Horizontal White Space (Ctrl+E, \)
24. View White Space (Ctrl+E,S)
25. Word Wrap (Ctrl+E,W)
26. Incremental Search (Ctrl+I)
27. Comment Selection (Ctrl+E,C)
28. Uncomment Selection (Ctrl+E,U)
 
29. Toggle Bookmark (Ctrl+B,T)
30. Enable Bookmark (Ctrl+B,E)
31. Previous Bookmark (Ctrl+B,P)
32. Next Bookmark (Ctrl+B, N)
33. Clear Bookmarks (Ctrl+B,C)
34. Add Task List Shortcut (Ctrl+E,T)
 
35. Hide Selection (Ctrl+M, Ctrl+H)
36. Toggle Outlining Expansion (Ctrl+M,M)
37. Toggle All Outlining (Ctrl+M,L)
38. Stop Outlining (Ctrl+M,P)
39. Stop Hiding Current (Ctrl+M, Ctrl+U)
 
40. Generate Method Stub (Ctrl+K,M)
41. List Members (Ctrl+K,L)
42. Parameter Info (Ctrl+K,P)
43. Complete Word (Ctrl+K,W)
44. Insert Snippet (Ctrl+K,X)
45. Surround With (Ctrl+K,S)
 
View
46. Code (F7)
47. Designer (Shift+F7)
48. Server Explorer (Ctrl+W,L)
49. Class View (Ctrl+W,C)
50. Code Definition Window (Ctrl+W,D)
51. Object Browser (Ctrl+W,J)
52. Error List (Ctrl+W,E)
53. Output (Ctrl+W,O)
54. Properties Window (Ctrl+W,P)
55. Task List (Ctrl+W,T)
56. Toolbox (Ctrl+W,X)
 
57. Find Symbol Results (Ctrl+W,Q)
58. Bookmark Window (Ctrl+W,B)
59. Command Window (Ctrl+W,A)
60. Document Outline (Ctrl+W,U)
61. Resource View (Ctrl+W,R)
62. Macro Explorer (Alt+F8)
63. Web Browser (Ctrl+W,W)
 
64. Full Screen (Shift+Alt+Enter)
65. Pending Checkins (Ctrl+W,G)
66. Navigate Backward (Ctrl+-)
67. Navigate Forward (Ctrl+Shift+-)
68. Property Pages (Shift+F4)
 
Refactor
69. Rename (F2)
70. Extract Method (Ctrl+R,M)
71. Encapsulate Field (Ctrl+R,E)
72. Promote Local Variable to Parameter (Ctrl+R,P)
73. Remove Parameters (Ctrl+R,V)
74. Reorder parameters (Ctrl+R,O)
 
Website
75. Add New Item (Ctrl+Shift+A)
76. Add Existing Item (Shift+Alt+A)
 
Build
77. Build Solution (F6)
78. Build Web Site (Shift+F6)
 
Debug
79. Breakpoints (Ctrl+D,B)
80. Immediate (Ctrl+D,I)
 
81. Start Debugging (F5)
82. Start without Debugging (Ctrl+F5)
83. Exceptions (Ctrl+D,E)
84. Step Into (F11)
85. Step Over (F10)
86. Break at Function (Ctrl+D,N)
87. Delete All Breakpoints (Ctrl+Shift+F9)
 
Tools
88. Attach to Process (Ctrl+Alt+P)
89. Code Snippets Manager (Ctrl+K, Ctrl+B)
 
90. Run TemporaryMacro (Ctrl+Shift+P)
91. Record TemporaryMacro (Ctrl+Shift+R)
 
92. Macro Explorer (Alt+F8)
93. Macros IDE (Alt+F11)
 
Help
94. How Do I (Ctrl+F1,H)
95. Search (Ctrl+F1,S)
96. Contents (Ctrl+F1,C)
97. Index (Ctrl+F1,I)
98. Help Favourites (Ctrl+F1,F)
99. Dynamic Help (Ctrl+F1,D)
100. Index Results (Ctrl+F1,T)

Monday 4 June 2012

Garbage collection


The .NET Framework is a garbage-collected environment. Garbage collection is the process of
detecting when objects are no longer in use and automatically destroying those objects, thus
freeing memory.

In .NET, this new garbage collector works so that you as a developer are no longer required to
monitor your code for unneeded objects and destroy them.

With this new garbage collector, you can control certain aspects of its functions, as it works
behind the scenes in your application. Within the SDK documentation, look under the
System.GC class for more information.


Assemblies in .Net

Assemblies can be thought of as the building blocks of your applications.

Without an associated assembly, code will not be able to compile from IL.
As in the Windows DNA world where DLLs and EXEs are the building blocks of applications,

in the .NET world, it is the assembly that is the used as the foundation of applications.
With .NET, it is now possible to have multiple versions of components, or assemblies, running

on the same server side by side. An application will always look for the assembly that built it.
When an application is started in .NET, the application will look for an assembly in the

installation folder. Assemblies that are stored in a local installation folder are referred to as
private assemblies. If the application cannot find the assembly within the installation folder,
the application will turn to the Global Assembly Cache (GAC) for the assembly.

The structure of an assembly

Assemblies contain code that is executed by the Common Language Runtime. The great thing
about assemblies is that they are self-describing.





Assemblies are made up of the following parts:

  • The assembly manifest
  • Type metadata
  • Microsoft Intermediate Language (MSIL) code


The assembly manifest is where the details of the assembly are stored. The assembly is stored
within the DLL or EXE itself. Assemblies can either be single or multifile assemblies and,
therefore, assembly manifests can either be stored in the assembly or as a separate file. The
assembly manifest also stores the version number of the assembly to ensure that the
application always uses the correct version. When you are going to have multiple versions of
an assembly on the same machine, it is important to label them carefully so that the CLR
knows which one to use.