Code Snippet RW (Response.Write)

יום ראשון, מאי 4, 2008

Code Snippet For Response.Write   Ok, this code snippet must be the oldest trick in the book, but still I think it will help to developers how doesn't know about it.   1. Create a file name rw.snippet 2. Copy this XML code and save it. 3. From the tools menu in VS, select "Code Snippets manager". 4. Select import, and point it to the saved file. 5. To use the snippet write rw in the code editor. 6. Enjoy!   <?xml version="1.0" encoding="utf-8" ?> ...
2 תגובות

Parsing DateTime formats

יום ראשון, מרץ 2, 2008

A few ways to handle dates in application: try { //Tells the parser to expect a he-IL (culture) date format DateTime dateParse = DateTime.Parse("28/02/2008", new CultureInfo("he-IL")); //Tells the parser to expect a date with specific date format DateTime dateParseExact = DateTime.ParseExact("28/02/2008", "dd/MM/yyyy", null); //Tells the parser to expect a date with specific date format //with exact hours, minutes and seconds DateTime dateTimeParseExact = DateTime.ParseExact("28/02/2008 23:29:02", "dd/MM/yyyy HH:mm:ss", null); ...
תגיות: ,
אין תגובות

LINQ to SQL Classes

יום רביעי, אוקטובר 31, 2007

One can only wish everybody to speak LINQ!   The following solution demonstrate how to query database tables with object relational data classes. For this example you need to download and install the AdventureWorks Database provided by Microsoft.   First, create a new console project:    Open the "Server Explorer", click on the "Connect to Database" button:   Select the Microsoft SQL Server:   The next step is to connect to your AdventureWorks Database Server, from the "Add Connection" window. Select the appropriate Server and Database (AdventureWorks) and click OK. After that, you should see the AdventureWorks.dbo in...
2 תגובות

Cool trick with TAB in Visual Studio for auto completing code blocks

יום שלישי, יולי 17, 2007

I found a cool trick for auto completing some code blocks. Personally, I find it very convenient while i'm in hyperspace speed coding. Its called snippets and its built-in in Visual Studio, and you can create one yoursefe. When you start a new "try" block, after finishing to write "try", immediately press TAB button, it will auto complete to:try { } catch (Exception) { throw; } When you start a new condition block, "if (2 > 1)", and after you add the "else" condition, after finishing to write "else", immediately press TAB button, it will auto complete to:if (2 > 1) { } else { }
תגיות: , , ,
2 תגובות

SCRUM – Power to the people !

יום ראשון, יולי 15, 2007

Recently, I attended in the last lecture by ALM (meeting group) about SCRUM.I must say, at first, I didn't hooked up with the idea, and its seems like a wonderful world who's not connected to the reality.I finally consolidate my opinion about this method, which looks like a' lot of fun after all !Its seems like a best practice for dynamic and cool environment. Here's some reasons that makes the different for me: The fun in the entire process - project life cycle. The team developers deciding who develops what and how much time they will spent until...
תגיות: , ,
אין תגובות

Visual Studio shortcuts keys

You 2 can become a visual studio shotrcut keys GURU !http://www.dofactory.com/ShortCutKeys/ShortCutKeys.aspx Mister Miagi once said: Rule number one, breathe in and... breathe out ! Rule number two, first learn rule number one...
תגיות: , ,
אין תגובות

A ballad for my Check-In files – Source Safe

יום רביעי, יולי 11, 2007

Yesterday Yesterday, All those Check-ins seemed a waste of pay. Now my source files have all gone away. Oh I believe in yesterday. Suddenly, There's not half the files there used to be, And there's a milestone hanging over me. The Source Safe crashed so suddenly. I pushed something wrong What it was I could not say. Now all my data's gone and I long for yesterday-ay-ay-ay. Yesterday, The need for SourceSafe seemed so far away. I knew my data was all here to stay, Now I believe in yesterday.   Credits: Publish by some one else (dont know who),...
תגיות: ,
תגובה אחת

Ajax.NET Using PageMethods

יום רביעי, יוני 20, 2007

This is great article for using Ajax.NET PageMethods. By using PageMethods we can call Server Side Code function directly from the client and get some results returned from Server. http://www.singingeels.com/Articles/Using_Page_Methods_in_ASPNET_AJAX.aspx
תגיות: , ,
אין תגובות

ASP.NET OutputCache + OutputCache Profiles

יום חמישי, יוני 14, 2007

In many projects i built, i used the OutputCache to improve WebSites performance and scalability. OutputCache is a powerful tool for increasing WebSites performance. When using OutputCache, the IIS saves a new version for the specific requested Page in memory. The next time we request the same Page, the IIS will serve us the rendered Page from memory, there for not process the page again. We can also set some conditions for the cache version like: when to cache it, how, and for how long (Duration). First, how OutputCache directive looks like. in this case, we set the Duration to 300 (Seconds), witch means 5 minutes (300...
תגיות: , ,
אין תגובות

Ajax.NET – Independent updating UpdatePanel control

יום שלישי, יוני 12, 2007

The problem: When trying to update one UpdatePanel (up1) control next to another UpdatePanel (up2) control, one influences the other and there both triggered. The solution: Adding Attribute UpdateMode="Conditional" to the UpdatePanel control that you don’t wish to update when triggering the next UpdateControl. Now they will not trigger each other.<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <table width="400" cellpadding="0" border="1" cellspacing="0"> <tr> <td><asp:TextBox runat="server" ID="tb1"...
תגיות: , ,
אין תגובות