|
|
-
|
|
A recent requirement in the project states to find the previous quarters from the current one. Obviously how many quarters to be generated will be given.
Here is mine
[Code]
var currentQuarter = DateTime.Now.Month / 4 + 1;
......
|
|
-
|
|
I'm not giving a course on the adapter layer of ASP.Net but as a quick reminder: most of ASP.Net built-in webcontrols' rendering is affected by "browser capabilities".
So depending of the browser you're using the (X)HTML markeup renderend may differnt ......
|
|
-
|
|
When you have a WinForms application, which hosts a WPF user control using ElementHost control, you can't rely on AppDomain.CurrentDomain.UnhandledException or Application.ThreadException to handle WPF exceptions.
To get around it,
1. In your main......
|
|
-
|
|
In few scenarios, we use repeater control in asp.net to display data on webpage.
[code]
<%# Eval(“FirstName”) %>
[/code]
for bind data with that field now next release of visual studio support strongly type data where we can set modeltype for......
|
|
-
|
|
We know that If a class is marked as "sealed", it can't be inherited by any other class. But coming to sealed methods There is a difference in behaviour. You can't directly mark a method as sealed. A sealed method should have the "override" modifier als......
|
|
-
|
|
[code]
var now = new Date()
var tz = (now.getTimezoneOffset().toString()) * (-1);
[/code]
[code]
public static string getLocalTime(string Time, string format)
{
if (format.Trim() == "")
{
......
|
|
-
|
|
Just learned from Eric Lippert's blog that, while storing string, it will initially store the length of that string in 4-bytes, then it will stores the each character of string in 2 byte chunks...
So, always string length comparison will benefit from......
|
|
-
|
|
Problem:
Its common requirement that, aspx names will change, in that scenario, these pages will become stale and search engines will point to these dead links, which negatively affects SEO ranking. Even when we use "Response.Redirect" to redirect t......
|
|
-
|
|
In Visual Studio 2010, there is a feature to optimize the code.
Right click on Project, click on "Run Code Analysis"
A list of probable optimization will be displayed.......
|
|
-
|
|
When a browser requests an ASP.Net page from the server but does not wait for the entire page to be downloaded, the server continues to process the request, wasting CPU cycles. However, in Internet Information Server (IIS) , you can use the Response.Is......
|
|