I just came across a requirement of merging two arrays of integers. So I already had this integer array and there was a new array of same type and required merging those two. Yep remove any duplicates as well.
At the beginning there was only ASP.net Web Forms. Now you have three different models to choose with.
ASP.net Web Forms
ASP.net Web Pages
ASP.net Web Forms
These are set of pages that has a UI (User Interface), Server Controls and Server Code. When a user sent a request to the page using the browser, it goes to the server, then compiled and executed at the server side. Finally generates HTML markup that can be rendered on your browser. If you are a experienced Windows Forms developer its a good choice to choose Web Forms. It is the event driven world that you already familiar with.
Server Controls such as Button, Grids, Labels, DropDowns can be easily dragged and dropped to your design and start coding like you did with Windows Forms. To write server code to handle the logic for the page, you can use a .NET language like Visual Basic or C#.
The MVC stands for Model View Control. This is a design pattern most developers are familiar with. This is a light weight framework that can be used with ASP.net features such as Membership based authentication and Master Pages. This pattern separates your application into three parts. The logic of the application goes under Model. The presentation layer goes under View and finally talking between model and the presentation layer goes under Controller. Again to write code and handle the logic you can use a .NET language like Visual Basic or C#.
Yep, a nice little question. Some of you may have wondering how to do that. In my database ID field it says “1” (or any integer value) on my Web Page or Windows Form I need to print this as “0001”. Do we have a simplest method to do that? And the answer is (drum roll) ….. YES ..
OK, next question what does this format specifier “D” means. Here is the MSDN help about it.
The “D” (or decimal) format specifier converts a number to a string of decimal digits (0-9), prefixed by a minus sign if the number is negative. This format is supported only for integral types.
The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier. If no precision specifier is specified, the default is the minimum value required to represent the integer without leading zeros.
Also we can use another string method known as . Lets have a look on that code.