Wednesday, April 7, 2010

New <%: %> Code Syntax in ASP.NET 4.0

HTML Encoding

Cross-site script injection (XSS) and HTML encoding attacks are two of the most common security issues that plague web-sites and applications. They occur when hackers find a way to inject client-side script or HTML markup into web-pages that are then viewed by other visitors to a site.

This can be used to both vandalize a site, as well as enable hackers to run client-script code that steals cookie data and/or exploits a user’s identity on a site to do bad things.

One way to help mitigate against cross-site scripting attacks is to make sure that rendered output is HTML encoded within a page. This helps ensures that any content that might have been input/modified by an end-user cannot be output back onto a page containing tags like <script> or <img> elements.

How to HTML Encode Content Today

ASP.NET applications (especially those using ASP.NET MVC) often rely on using code-nugget expressions to render output. Developers today often use the Server.HtmlEncode() or HttpUtility.Encode() helper methods within these expressions to HTML encode the output before it is rendered. This can be done using code like below:

<div class="someclass">
<%= Server.HtmlEncode(Model.Content) %>
</div>

While this works fine, there are two downsides of it:

  • It is a little verbose
  • Developers often forget to call the Server.HtmlEncode method – and there is no easy way to verify its usage across an app

New Code Nugget Syntax

With ASP.NET 4 we are introducing a new code expression syntax () that renders output like blocks do – but which also automatically HTML encodes it before doing so.

This eliminates the need to explicitly HTML encode content like we did in the example above. Instead, you can just write the more concise code below to accomplish the exact same thing:

<div class="someclass">
<%: Model.Content %>
</div>

We chose the syntax so that it would be easy to quickly replace existing instances of code blocks. It also enables you to easily search your code-base for elements to find and verify any cases where you are not using HTML encoding within your application to ensure that you have the correct behavior.

Happy Coding!!!

Thanks : Scottgu.

Free ebook - Essential SQL on SQL Server 2008

Dr. Sikha Bagui, Dr. Richard Earp, "Essential SQL on SQL Server 2008"

This book, written for readers who have little or no previous experience with databases, SQL, or SQL Server, provides a very systematic approach to learning SQL (Structured Query Language) using SQL Server.

Each chapter is written in a step-by-step manner and has examples that can be run using SQL Server. Using the sample tables and data provided, the reader of this book will be able to do all the examples to experience hands-on SQL programming in SQL Server. The text also presents a series of exercises at the end of the chapters to help readers gain proficiency with SQL.

With this book you will learn: Beginning SQL commands how to retrieve and manipulate data using the simple SELECT statement. How to customize SQL Server 2008 s settings and about SQL Server 2008 s functions. How to create, alter, populate and delete tables. About joins, a common database mechanism for combining tables.

Query development, the use of views and other derived structures. Simple set operations. About aggregate functions. How to write subqueries and correlated subqueries. How to create and use indexes and constraints. Transaction processing.



Product Details

  • Paperback: 300 pages
  • Jones and Bartlett Publishers, Inc
  • Language: English
  • ISBN-10: 076378138X

Free Download Links :

1. Hotfile Link
http://hotfile.com/.../076378138X.EBW.zip.html

2. Rapidshare Link
http://rapidshare.com/.../076378138X.EBW.zip.html

3. Mediafire Link
http://www.mediafire.com/?mlwz3unylg3

If you like this post, please add your comments and 'A thanks' would be nice.

Thanks : ebookw.net

Tuesday, April 6, 2010

Free ebook - Essential C# 4.0, 3rd Edition

Essential C# 4.0, 3rd Edition

Essential C# 4.0 is a well-organized,“no-fluff” guide to all versions of C# for programmers at all levels of C# experience. This fully updated edition shows how to make the most of C# 4.0’s new features and programming patterns to write code that is simple, yet powerful.

This edition contains two new chapters on parallel programming, multi­threading, and concurrency, as well as extensive coverage of new C# 4.0 features: dynamic typing, variance, optional/named parameters, and many other new topics.

Mark Michaelis covers the C# language in depth, illustrating key constructs with succinct, downloadable code examples. Graphical “mind maps” at the beginning of each chapter show what material is covered and how individual topics interrelate.

Topics intended for beginners and advanced readers are clearly marked, and the book includes indexes of C# versions (2.0, 3.0, and 4.0), which make it easy for readers to reference topics specific to a given release of C#.


Product Details

  • Paperback: 984 pages
  • Addison-Wesley Professional; 3 edition (March 20, 2010)
  • Language: English
  • ISBN-10: 0321694694
  • ISBN-13: 978-0321694690

Free Download Links :

1. Hotfile Link
http://hotfile.com/.../Addison.Wesley.Essential.CSharp.4.0.Feb.2010.rar.html

2. Depositfiles Link
http://depositfiles.com/../qpw02z5ro

3. SharingMatrix Link
http://sharingmatrix.com/file/3164843

4. Megaupload Link
http://www.megaupload.com/?d=GLA2ONHW

5. Ifile Link
http://ifile.it/dl

If you like this post, please add your comments and 'A thanks' would be nice.

Free ebook - Numerical Methods, Algorithms and Tools in C#

Numerical Methods, Algorithms and Tools in C#

The book focuses on standard numerical methods, novel object-oriented techniques, and the latest Microsoft .NET programming environment. It covers complex number functions, data sorting and searching algorithms, bit manipulation, interpolation methods, numerical manipulation of linear algebraic equations, and numerical methods for calculating approximate solutions of non-linear equations.

The author discusses alternative ways to obtain computer-generated pseudo-random numbers and real random numbers generated by naturally occurring physical phenomena.

He also describes various methods for approximating integrals and special functions, routines for performing statistical analyses of data, and least squares and numerical curve fitting methods for analyzing experimental data, along with numerical methods for solving ordinary and partial differential equations.

The final chapter offers optimization methods for the minimization or maximization of functions.

Exploiting the useful features of C#, this book shows how to write efficient, mathematically intense object-oriented computer programs. The vast array of practical examples presented can be easily customized and implemented to solve complex engineering and scientific problems typically found in real-world computer applications.



Product Details

  • Paperback: 600 pages
  • Numerical Methods, Algorithms and Tools in C# (October 10, 2009)
  • CRC Press
  • Language: English
  • ISBN-10: 0849374790

Free Download Links :

1. SharingMatrix Link
http://sharingmatrix.com/.../0849374790.rar

2. Rapidshare Link
http://rapidshare.com/files/369658409/0849374790.rar

3. File2box Link
http://www.file2box.net/xui1dg28qqku

4. Uploading Link
http://uploading.com/.../0849374790.rar/


If you like this post, please add your comments and 'A thanks' would be nice.

Free ebook - Effective C# : 50 Specific Ways to Improve Your C#

Effective C#: 50 Specific Ways to Improve Your C#, 3nd Edition

C# has matured over the past decade: It’s now a rich language with generics, functional programming concepts, and support for both static and dynamic typing. This palette of techniques provides great tools for many different idioms, but there are also many ways to make mistakes.

In Effective C#, Second Edition, respected .NET expert Bill Wagner identifies fifty ways you can leverage the full power of the C# 4.0 language to express your designs concisely and clearly.

Effective C#, Second Edition, follows a clear format that makes it indispensable to hundreds of thousands of developers: clear, practical explanations, expert tips, and plenty of realistic code examples.

Drawing on his unsurpassed C# experience, Wagner addresses everything from types to resource management to dynamic typing to multicore support in the C# language and the .NET framework.

Along the way, he shows how to avoid common pitfalls in the C# language and the .NET environment. You’ll learn how to.


Product Details

  • Paperback: 352 pages
  • Addison-Wesley Professional; 2 edition (March 15, 2010)
  • Language: English
  • ISBN-10: 0321658701
  • ISBN-13: 978-0321658708

Free Download Links :

1. Hotfile Link
http://hotfile.com/...CSharp.Covers.CSharp.4.0.Feb.2010.rar.html

2. Rapidshare Link
http://rapidshare.com/.../0321245660.rar


If you like this post, please add your comments and 'A thanks' would be nice.

Free ebook - LINQ to Objects Using C# 4.0

LINQ to Objects Using C# 4.0: Using and Extending LINQ to Objects and Parallel LINQ

Your Complete Example-Rich Guide to Using and Extending LINQ to Objects and PLINQ

Using LINQ to Objects, .NET developers can write queries over object collections with the same deep functionality that was once available only with SQL and relational databases. Now, for the first time, developers have a comprehensive and authoritative guide to applying LINQ to Objects in real-world software.

Microsoft MVP Troy Magennis introduces state-of-the-art techniques for working with in-memory collections more elegantly and efficiently—and writing code that is exceptionally powerful, robust, and flexible.

Drawing on his unsurpassed experience coding software using LINQ and hosting the popular HookedOnLINQ.com site, Magennis presents timely, realistic solutions to a wide spectrum of development challenges, such as combining data from multiple sources, and achieving optimal performance with extremely large sets of data. Y

ou’ll begin with brief quick-starts that walk you through LINQ to Objects’ key features and query syntax. Next, you’ll drill down to detailed techniques for applying and extending these features with C# 4.0 and C# 3.0—including code examples that reflect the realities of production development.



Product Details

  • Paperback: 336 pages
  • Addison-Wesley Professional; 1 Pap/Pas edition (March 12, 2010)
  • Language: English
  • ISBN-10: 0321637003
  • ISBN-13: 978-0321637000

Free Download Links :

1.Hotfile Link
http://hotfile.com/.../Addison.Wesley.LINQ.to.Objects.Using.CSharp.4.0.Feb.2010.rar.html

2. Depositfiles Link
http://depositfiles.com/files/m0v20e8mj

3. SharingMatrix Link
http://sharingmatrix.com/file/3166117

If you like this post, please add your comments and 'A thanks' would be nice.

Free ebook - Pro ODP.NET for Oracle Database 11g


This book is a comprehensive and easy-to-understand guide for using the Oracle Data Provider (ODP) version 11g on the .NET Framework. It also outlines the core GoF (Gang of Four) design patterns and coding techniques employed to build and deploy high-impact mission-critical applications using advanced Oracle database features through the ODP.NET provider.

The book details the features of the ODP.NET provider in two main sections: “Basic,” covering the basics and mechanisms for data access via ODP.NET; and “Advanced,’ covering advanced Oracle features such as globalization, savepoints, distributed transactions and how to call them via ODP.NET, advanced queueing (AQ), and promotable transactions. It takes you from the ground up through different implementation scenarios via a rich collection of both VB.NET and C# code samples.

It outlines database security and performance optimization tricks and techniques on ODP.NET that conform to best practices and adaptable design. Different GoF design patterns are highlighted for different types of ODP.NET usage scenarios with consideration of performance and security.

It provides a comprehensive guide to the synergistic integration of Oracle and Microsoft technologies such as the upcoming Oracle Developer Tools for Visual Studio (11.1.0.7.10). It also details how programmers can make use of ODT to streamline the creation of robust ODP.NET applications from within the Visual Studio environment.


Product Details

  • Paperback: 300 pages
  • Publisher: Apress; 1 edition (April 19, 2010)
  • Language: English
  • ISBN-10: 1430228202
  • ISBN-13: 978-1430228202

Free Download Links :

1.Hotfile Link
http://hotfile.com/...Apress.Pro.ODP.NET.for.Oracle.Database.11g.Apr.2010.rar.html

2. Rapidshare Link
http://rapidshare.com/.../1430228202_ProODP.rar

3. Uploading Link
http://uploading.com/.../1430228202_ProODP.rar/

4. Megaupload Link
http://www.megaupload.com/?d=MSMVW4AL

If you like this post, please add your comments and 'A thanks' would be nice.