Subscribe to ITTreats.com - ASP/ASP.NET

Weird behavior when debugging ASP.NET Web application: cookie expires (1/1/0001 12:00AM) by itself on next breakpoint hit.

I’m working on ajaxified (Telerik AJAX Manager) ASP.NET application using Visual Studio 2010 (runs with admin privileges) and IIS 7.5. Basically, everything on the page is inside update panels. As for cookies I have custom encrypted “settings” cookie which is added to Response if it’s not there on session start. Application runs smoothly, problem was arising when I started [...]

Programação Paralela, – free ebook

Pessoal, está disponivel gratuitamente um ebook sobre Parallel Programming with .NET. O link é http://parallelpatterns.codeplex.com/ e com certeza vale a pena. Há tantas novidades e tecnologias pra estudarmos que cada vez mais precisamos de tempo (Azure, WinPhone 7, Silverlight, ADO Synchronization, .NET Micro Framework, etc…). Boa leitura.

‘Content’ is NOT ‘Text’ in XAML

One of the key concepts in XAML is that the Content property of a XAML control like a Button or ComboBoxItem does not have to contain just textual data. In fact, Content can be almost any other XAML that you want. To illustrate here is a simple example of how to spruce up your Button [...]

Interesting links week #6

Below a list of interesting links that I found this week: Frontend: Understanding CSS Selectors Javascript: Breaking the Web with hash-bangs HTML5 Peeks, Pokes and Pointers Development: 10 Points to Take Care While Building Links for SEO View State decoder ASP.NET MVC Performance Tips Other: Things to Remember Before Launching a Website Tips and Tricks [...]

Adding Client Validation To DataAnnotations DataType Attribute

The System.ComponentModel.DataAnnotations namespace contains a validation attribute called DataTypeAttribute, which takes an enum specifying what data type the given property conforms to.  Here are a few quick examples: public class DataTypeEntity { [DataType(DataType.Date)] public DateTime DateTime { get; set; }   [DataType(DataType.EmailAddress)] public string EmailAddress { get; set; } } This attribute comes in handy [...]

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, [...]

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