Subscribe to ITTreats.com - Microsoft Tech

Calculate Page Execution time in PHP

For those people who want to give users that in how many seconds actually your web page loaded completely. This script will be useful for you. There are so many ways to do this ( As usual ) but the classic approach would be Step 1 : make a note of  the time when your [...]

Paginating in ASP

Pagination in asp, plays major roll when you want to display page wise results , what if the recordset size is more or huge, in that case the processing of the page will become slow… For that here is the query , which will really help you the following query is MSSQL query For example [...]

Creating and Using Own Templates using ASP

When ever the scripts on your pages will become complex, Templates are the best solution. working on ASP Templates is quite easy, 1. Stick to page layout eg:. pregare a static html page with your requirements 2. change the content part of each division to one standard identification string eg:. <div id=’leftpanel’> <ul> <li>1</li> <li>1</li> [...]

How to Make Read only Check Boxes

How we can make a Chek box readonly? Even if we provide Readonly attribute you still can check or uncheck the checkbox.. then how we can make a CheckBox ReadOnly ?? Here is the simple solution,  we can do this  with Javascript. here is how it goes write a onclick even for the desired checkbox, [...]

Adding Sub MenuItems to the Context Menu Item Dynamically

You can’t add sub menuitems to a Context Menu Item Programatically for more than one time. If you try to add first sub menu item it will add up into the list then again if you try to add then the sub menu items wont be displayed, but if you debug it you will find [...]

Strip HTML tags ,Script blocks,Forms, style blocks using Regex in C#.net

Many times in Many cases we may come across this problem how to strip HTML Tags, How to Remove Script Blocks ? How to remove Form Blocks and how to remove Style sheet blocks ? for those questions here is the simple and best answer

Processing Web Request from c#.net/vb.net

To process  web request from c#.net/vb.net windows application we have  WebRequest Class. import  System.Net,System.IO name spaces  for requesting and processing the result here is the example code 1. create a uri with the required URL   Uri wsn=new Uri(\”http://www.ITTreats.com\”); 2.Next  create a webRequest class and pass the above uri object to it   WebRequest wr=WebRequestFactory.Create(wsn) 3.  Now, [...]

How to Hide when form is minimized

To Hide a Form when minimize button is pressed, we have to write a event for Form Sized Changed event in that, add this condition if (this.WindowState == System.Windows.Forms.FormWindowState.Minimized) { this.Visible = false; }

working with Notify Icon and Context menu

Working with  Notify Icon and Context menu is simple please follow the  steps 1. Drag and Drop the NotifyICon, Context Menu from the Tool Box 2. Change the names and text of the controls 3. Now, Create the Required Menu  for the COntext menu for eg: add the Cut,Copy,Paste,Delete  Menuitems to the  context Menu 4. [...]