ASP.NET
This section will contain Tips and Tricks, Talks and News about ASp.Net related Posts.
While developing a Website you might want to limit the users to download the file only once or would like to hide the link if they successfully downloaded a particular file. In traditional way of downloading the file its hard to know on the server side that file is downloaded successfully by the client. Solution is to stream the file in small chunk and make sure that is connected before streaming the next chunk. If you sucessfully transmitted the whiole file then this would mean that client has
Validating user input is an important requirement of most web applications. However, many ASP.NET developers find the standard ASP.NET validation controls to be either hard to use or lacking in features. Peter Blum answers the most frequently asked questions concerning ASP.NET validation.
If you are using FomrsAuthentication against ActiveDirectory you might want to search if a User Id exist in Active Directory or not before taking certain action like creating new profile.This return true or false depending on if user is found or not.
While working on a Data Form in an ASp.Net application you might want to get a value from the user that corresponds to the Enum you created in your Business Layer. Since Enum types are not strings or .ToString() function doesn't work directly with Enums you need to do it in slightly different way ...
Solution:
Lets take an example ...
ieSpell is a free Internet Explorer browser extension that spell checks text input boxes on a webpage. It should come in particularly handy for users who do a lot of web-based text entry (e.g. web mails, forums, blogs, diaries). Even if your web application already includes spell checking functionality, you might still want to install this utility because it is definitely much faster than a server-side solution. Plus you get to store and use your personal word list across all your applications,
In numerous occasions you want to display a drop down box that contains for example a Cit and City No but you also want to have it linked with let's say Employee number since the city list is in a Form where you filling the employee data. the out of box drop down doesn't allow you to store more then 2 fields at a time.
Following solution allows you to store an extra field with the given 2 fields in ASP.Net drop down list.
I was recently working on one of my project and needed to add postback of a button to one of the images on my Page. After doing some research I found out that it is real easy to add Postbacks to your HTML elements that support Javascript onClick event ...
Also sometimes you are generating anchor hyperlinks in your code behind and want the page to be posted back to the sever when someone clicks on those links rather then going to another page. Here is how to accomplish this ...
In ASP.Net projects I have come across numerous time that you need to position the the page at certain vertical location on PostBack. For example you might have multiple long Panels or grids that when clicked need to post back the data to the server and return to certain other panel or Grid on the Page. SmartNavigation feature of ASP.Net allows you to keep the last click position on post back but does not allow the positioning of the page to any other desired location.
Community Editor is web based WYSIWYG HTML editor. It enables ASP.Net Web developers to replace the Textarea in your existing/new Web Sites with a powerful, but easy to use WYSIWYG Editor.
This rich editing tool empowers end users with an intuitive, easy-to-use interface for creating and publishing Posts/Forms without relying on any client-side components or controls.
ASP.Net has a very powerful Cache Management component. Cache is part of the most enterprise level .Net project. ASP.Net Data Cache is very flexible and is also available to Windows application by making use of HttpRuntime.Cache object. Microsoft provides a Cache Management Application Block but it can be overkill for lot of applications .....
Full ASP.NET Archive