Sunday, June 29, 2008

Restricting user to visit previous pages after user logs out


ShareThis
Its have been a crital task for me for a variety of web aps for restricting users to visit previous pages after he logs out. I have did a lot of research and got many solutions, from using meta tags, to altering the request's headers etc. but the best way I found is by suing Java script along with these mentioned methods.

Particularly using two or more methods make the solution fool proof..
I will write a detailed article on this sub. soon till intereste dfolks should read this good java script resourse...

http://www.hunlock.com/blogs/Mastering_The_Back_Button_With_Javascript

Some more relevant posts resourses over the net:
Pragma: No-cache" Tag May Not Prevent Page from Being Cached

how could I disable the browser's back button using javascript?
------------------->
About the only way you can do this is to open a new window using window.open() (specifying that the browser history should not be copied to the new window) and then close the existing one.
=======================================


It can be done in 4+ browsers but it doesn't really disable the back button, just erases the data behind it to an extant.

replace Method
The replace method replaces the current History entry with the specified URL. After calling the replace method, you cannot navigate back to the previous URL using the browser's Back button.

Syntax: location.replace(URL)

This will replace the history with the current link every time a link is clicked
code/font>

<SCRIPT>
function getTag(el,str) {
while ((el!=null) && (str.indexOf(el.tagName + ":")<0))
el = el.parentElement
return el
}

function navigateTo(sURL,target) {
if ((target == '_self') | | (target=="")) {
window.location.replace(sURL);
return false;
}
if (target == '_top') {
top.window.location.replace(sURL);
return false
}
if (target =='_parent') {
parent.window.location.replace(sURL);
return false;
}
if (target == '_blank' | | parent.frames.length < 1) {
window.open(sURL, target);
return false;
}
else {
if (parent.frames[target])
parent.frames[target].location.replace(sURL);
else
window.open(sURL, target);
return false;
}
}

function checkIEClick() {
var el = getTag(event.srcElement,"A:AREA:")
if ((el!=null) && ((el.tagName=="A") | | (el.tagName=="AREA"))) {
event.returnValue = false
navigateTo(el.href,String(el.target).toLowerCase())
}
}

function checkNSClick(ev) {
if (ev.target.href) {
navigateTo(ev.target.href,String(ev.target).toLowerCase())
return false
}

}

if ((document.all) | | (document.layers))
if (document.layers) {
document.captureEvents(Event.CLICK)
document.onclick = checkNSClick
}
else
document.onclick = checkIEClick
</SCRIPT>
[/code]

A little slick redirection:
code/font>

<META HTTP-EQUIV="Refresh" CONTENT="1; http://www.insideDHTML.com/home.asp">
<SCRIPT>
<!--
var version = parseInt(navigator.appVersion)
// replace is supported
if (version>=4 | | window.location.replace)
window.location.replace("newPage.htm")
else
window.location.href = "newPage.htm"
// -->
</SCRIPT>
The document, <A HREF="newPage.htm">Scott's Home</A> has moved.
[/code]

The above code was found at Site Experts. I hope it is useful.
==========
Wayne Luke - Sitepoint Forums Administrator
(http://www.sitepoint.com/forums/showthread.php?t=8315)
===================================================================

Here are some work arounds but not fool froof as the auther him self says:

http://www.htmlgoodies.com/tutorials/buttons/article.php/3478911
http://www.irt.org/script/311.htm

===================================================================

Friday, June 27, 2008

Microsoft Certifications


ShareThis
Microsoft Certifications are standard for giving you recognition in the IT market.
There are different series and certification tracks in different streams of job profiles.

Learn more about Microsoft Certifications here:
http://podcasts.performnet.com/0101NGC/preload.html?swf=0101NGC.swf&wdth=747&hght=560&delivery=web

New Generation Certification Exam Map:
https://partner.microsoft.com/us/40052282

Certification Exam guide:
https://partner.microsoft.com/us/40046686

MCTS: Microsoft Certified Technology Specialist:
https://www.microsoft.com/learning/mcp/mcts/webapps/default.mspx

Preparation Guide for Exam 70-528
https://www.microsoft.com/learning/en/us/exams/70-528.mspx

Few Internet Tips


ShareThis
Get few good internet tips here : http://www.computerhope.com/tips/internet.htm#12

Inner working of Exception


ShareThis
Here is the best ever article to let us understand how Exceptions work and are handeled internally.

http://blogs.msdn.com/cbrumme/archive/2003/10/01/51524.aspx

Debugging the Visual Studio


ShareThis
Read some good articles here
http://blogs.msdn.com/tess/archive/2008/05/21/the-21-most-popular-blog-posts.aspx

My feed for the blog at FeedBurner


ShareThis
My feed for the blog at FeedBurner

My feed for the blog at FeedBurner

Tuesday, June 24, 2008

ASP.NET Is a Leaky Abstraction


ShareThis
ASP.NET Is a Leaky Abstraction:

In teaching someone about ASP.NET programming, it would be nice if I could just teach them that they can double-click on things and then write code that runs on the server when the user clicks on those things. Indeed ASP.NET abstracts away the difference between writing the HTML code to handle clicking on a hyperlink () and the code to handle clicking on a button. Problem: the ASP.NET designers needed to hide the fact that in HTML, there’s no way to submit a form from a hyperlink. They do this by generating a few lines of JavaScript and attaching an onclick handler to the hyperlink. The abstraction leaks, though. If the end-user has JavaScript disabled, the ASP.NET application doesn’t work correctly, and if the programmer doesn’t understand what ASP.NET was abstracting away, they simply won’t have any clue what is wrong.

– Joel Spolsky, The Law of Leaky Abstractions, November 11, 2002

http://www.onenaught.com/posts/42/aspnet-is-a-leaky-abstraction

Visual Studio Shortcuts


ShareThis
Find some really good Visual Studio Shortcuts here

Creating great thumbnails in ASP.NET


ShareThis
Found some great articles / codes for
Creating great thumbnails in ASP.NET here

Generating image thumbnails in ASP.NET
http://dotnetslackers.com/articles/aspnet/Generating-Image-Thumbnails-in-ASP-NET.aspx

GD Sharp Wrapper Engine
GD-Sharp is a .NET wrapper for the GD Library, developed with mono for Linux and Windows.
http://sourceforge.net/projects/gd-sharp/
http://freshmeat.net/projects/gd-sharp/?branch_id=49487&release_id=160682

ASP.NET Tips, Tricks, Recipes and Gotchas From ScottGuu


ShareThis
Visual Studio 2005

* Tip/Trick: Optimizing ASP.NET 2.0 Web Project Build Performance with VS 2005
* Common Gotcha: Slow VS 2005 Web Site Build Performance Because of “Dueling Assembly References”
* Common Gotcha: Public Hotfix available for Slow Debugging Problems
* Tip/Trick: Changing the default browser used in VS 2005 and Visual Web Developer
* Tip/Trick: Creating Packaged ASP.NET Setup Programs with VS 2005
* Resource: VS 2005 Web Application Project Tutorials
* Recipe: Using VS 2005 Web Deployment Projects
* Tip/Trick: Custom formatting HTML in Visual Web Developer and Visual Studio 2005
* Tip/Trick: Fast HTML Editor Navigation within VS 2005
* Tip/Trick: How to Run a Root “/” Site with the Local Web Server using VS 2005 SP1
* Tip/Trick: Creating Re-Usable Project and Item Templates with VS 2005
* Tip/Trick: Creating Sub-Web Projects using the VS 2005 Web Application Project Option
* Tip/Trick: Spell Checker Plug-in for VS 2005 for ASP.NET and HTML Pages
* Tip/Trick: Using IIS7 on Vista with VS 2005
* Gotcha: Fixing Error with VS 2005 SP1 Beta and older Web Application Project Templates

UI

* Tip/Trick: Enabling URL Rewriting with ASP.NET
* Tip/Trick: Using Server Side Comments with ASP.NET 2.0
* Tip/Trick: Use the ASP.NET 2.0 CSS Control Adapters for CSS friendly HTML output
* Tip/Trick: How to Register User Controls and Custom Controls in Web.config
* Recipe: Dynamic Site Layout and Style Personalization with ASP.NET
* Tip/Trick: Advanced Article on ASP.NET 2.0 Master Pages

AJAX

* Tip/Trick: Handling Errors with the UpdatePanel control using ASP.NET AJAX
* Tip/Trick: Cool UI Templating Technique to use with ASP.NET AJAX for non-UpdatePanel scenarios
* Links: ASP.NET AJAX and ASP.NET AJAX Control Toolkit Articles
* Gotcha: Lost HTML Intellisense within ASP.NET AJAX Controls
* Gotcha: Don't use with ASP.NET AJAX
* Tip/Trick: UpdateProgress Control and AJAX Activity Image Animations
* Tip/Trick: Nikhil's WebDevHelper Utility and ASP.NET AJAX Support

Data

* Tip/Trick: How to Upload a .SQL file to a Hoster and Execute it to Deploy a Database
* Tip/Trick: Deploying a SQL Database to a Remote Hoster Environment
* Tip/Trick: Online Database Schema Samples Library
* Recipe: Great ASP.NET 2.0 Data Tutorials
* Recipe ASP.NET 2.0 RSS Tool-Kit
* Recipe: Paging through lots of data efficiently (and in an Ajax way) with ASP.NET 2.0
* Recipe: Efficient Data Paging with the ASP.NET 2.0 DataList Control and ObjectDataSource
* Tip/Trick: ListControl.AppendDataBoundItems Property in ASP.NET 2.0

Security

* Resource: ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security Resources
* Recipe: Enabling Windows Authentication within an Intranet ASP.NET Web application
* Recipe: Implementing Role Based Security with ASP.NET using Windows Authentication and SQL Server
* Recipe: Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005
* Tip/Trick: Integrating ASP.NET Security with Classic ASP and non-ASP.NET URLs
* Gotcha: Always set the "applicationName" property when configuring ASP.NET 2.0 Membership and other Providers
* Common Gotcha: Don't forget to when adding providers
* Tip/Trick: Source/Documentation for Simple ASP.NET 2.0 SQL Providers Published
* Tip/Trick: Guard Against SQL Injection Attacks
* Tip/Trick: Gathering Custom User Registration Information
* Recipe: How to add a Login, Roles and Profile system to an ASP.NET 2.0 app in only 24 lines of code
* Gotcha: Authorization with the built-in VS 2005 Web Server (aka Cassini)
* Gotcha: Forms Authentication timeout default changed between ASP.NET 1.1 -> ASP.NET 2.0
* Tip/Trick: How To Share Authentication Cookies across ASP.NET V1.1 and ASP.NET V2.0 Applications
* Tip/Trick: Enabling SSL on IIS 7.0 using Self Signed Certificates

Deployment

* Gotcha: Don’t run production ASP.NET Applications with debug=”true” enabled
* Tip/Trick: Automating Dev, QA, Production Web.Config Settings with VS 2005
* Tip/Trick: Creating Packaged ASP.NET Setup Programs with VS 2005
* Tip/Trick: Patterns and Practices Guidance Explorer for .NET and ASP.NET
* Tip/Trick: App_Offline.htm and working around the "IE Friendly Errors" feature
* Tip/Trick: Show Detailed Error Messages to Developers (and only to Developers)
* Tip/Trick: Logging ASP.NET Application Shutdown Events

Performance

* Tip/Trick: Implement "Donut Caching" with the ASP.NET 2.0 Output Cache Substitution Feature
* Tip/Trick: Disk Based Output Caching Feature Now Available for ASP.NET 2.0
* Tip/Trick: Cache Manager

.NET 3.5 and VS 2008

* VS 2008 Multi-Targeting Support
* VS 2008 JavaScript Intellisense
* VS 2008 JavaScript Debugging
* VS 2008 Code Editing Improvements
* VS 2008 Nested Master Page Support
* VS 2008 Web Designer and CSS Improvements
* VS 2008 Vertical Split View Support
* VS 2008 ASP.NET AJAX Control Extenders
* ASP.NET ListView Control (Part 1: Building a Product Listing Page with Pure CSS)
* ASP.NET AJAX in .NET 3.5 and VS 2008

LINQ and .NET 3.5

* LINQ to SQL (Part 1 - Overview)
* LINQ to SQL (Part 2 - Defining our Data Model Classes)
* LINQ to SQL (Part 3 - Querying our Database)
* LINQ to SQL (Part 4 - Updating our Database)
* LINQ to SQL (Part 5 - Binding UI using the asp:linqdatasource)
* LINQ to SQL (Part 6 - Retrieving data using stored procedures)
* LINQ to SQL (Part 7 - Updating our database using stored procedures)
* LINQ to SQL (Part 8 - Executing Custom SQL Expressions)
* LINQ to SQL (Part 9 - Using a Custom LINQ Expression with the control)
* LINQ to XML (How to Build a Custom RSS Reader with it)
* New Language Feature: Automatic Properties, Object Initializer and Collection Initializers
* New Language Feature: Extension Methods
* New Language Feature: Lambda Expressions
* New Language Feature: Query Syntax
* New Language Feature: Anonymous Types
* Recipe: Tagging Data using LINQ
* Null Coalescing Operator and using it with LINQ

Silverlight

* My Silverlight Overview Post
* My "Lap Around Silverlight" talk from TechEd
* Building Silverlight Applications using .NET
* Tip/Trick: Supporting Full Screen Mode with Silverlight
* VS 2008 JavaScript Intellisense for Silverlight

Miscellaneous

* Resource: Credit Card Payment Processing with ASP.NET
* Tip/Trick: List Running ASP.NET Worker Processes and Kill/Restart them from the command-line