0
Comments

Implement custom Claim based Authorization in ASP.NET MVC Web Application by shahed

To download the source code please click here Introduction Claim-based authorization is a new model of authorization introduced in Windows Communication Foundation. This model addresses more scenarios than the popular role based  security model ...
0
Comments

Use IoC slash Dependency Injection framework to manage hierarchical object structure better by shahed

To download the sourcecode click here Introduction Recently I have been working with some hierarchical object structures that are a composition of several other nested classes and elements, that we call “template objects”. To give you an idea of this...
3
Comments

ASP.NET MVC, ASP.NET Tips: Provide immediate feedback to the browser on Long Running Tasks – using IFrame and web handlers by shahed

  to download the source code please click here The <iframe> tag defines an inline frame that contains another document and is supported in all major browsers. The <iframe> can be placed anywhere in the document flow. The iframe properties...
3
Comments

ASP.NET MVC, ASP.NET Tips: Provide immediate feedback to the browser on Long Running Tasks – using XMLHttpRequest call by shahed

XMLHttpRequest (XHR) is a DOM API that can be used inside a web browser scripting language, such as JavaScript, to send an HTTP or an HTTPS request directly to a web server and load the server response data directly back into the scripting language. The...
2
Comments

ASP.NET MVC, ASP.NET Tips: Provide feedback to the user on Long Running Tasks – using loader image - MS AJAX and JQuery by shahed

It is quite common to display a loader-image or some kind of progress bar image in a browser when the server is busy serving the request. Before we go deep into page streaming techniques with XMLHTTPRequest call and IFrame, lets look into a simple loader...
3
Comments

ASP.NET MVC, ASP.NET Tips: Provide immediate feedback to the browser on Long Running Tasks – in Asynchronous ASP.NET pages by shahed

  to download the source code please click here In the earlier post we have discussed little bit about the limited number of worker threads available in the thread pool of ASP.NET and we identified why we should always try to avoid to block those...
6
Comments

ASP.NET MVC, ASP.NET Tips: Provide immediate feedback to the browser on Long Running Tasks – by streaming regular ASP.NET page by shahed

Here in this series of post I am discussing few techniques to give client instant feedback on task progress in ASP.NET page. In the previous post I have discussed about displaying task progress - using regular handler, here I will discuss how to do the...
13
Comments

ASP.NET MVC, ASP.NET Tips: Provide immediate feedback to the browser on Long Running Tasks – using regular web handler by shahed

As an ASP.NET developer we frequently deal with long running tasks for example: Making long-lasting webservice calls. Making prolonged calls to database that runs complex queries. Do lengthy file operation Calling remote objects etc. When the server is...
0
Comments

Microsoft WebsiteSpark – Receive Windows Web Server and SQL Server Web Edition at no cost to host new websites by shahed

Now help is on the way in the form of Microsoft WebsiteSpark, a program announced today that will empower Web site design and Web application development firms with 10 or fewer employees. WebsiteSpark provides development tools, production licenses for...
2
Comments

ASP.NET, ASP.NET MVC Tips: JSON Handler, Aspx template, Asynchronous JQuery treeview with ashx generic handler and many more. by shahed

In my previous blog post , I have discussed about how to get asynchronous JQuery treevew to work with ASP.NET Webservices, and we identified that, to make a successful ASP.NET webservice call using JQuery the request must be POST request, the content...
2
Comments

ASP.NET Tips : Getting asynchronous JQuery treeview to work with ASP.NET Webservices by shahed

Recently I had to display some hierarchical data in a treeview. I looked around and found JQuery treeview can transforms an unordered list into an expandable and collapsable tree, and supports both location and cookie based persistence. Fig: JQuery Treeview...
0
Comments

ASP.NET MVC Tips: 301 Redirect non-www versions of URL to www. by shahed

Search Engine Optimization guides, recommends to have one version of a URL of the same content. Search engines may pickup www and non-www versions of URL as 2 separate URLs, i.e. http://xyz.com/page1 may be considered different to http://www.xyz.com/page1...
0
Comments

ASP.NET MVC Tips: Form POST, TryUpdateModel, unit test, Moq by shahed

Recently I have started playing with the Moq (pronounced "Mock-you" or just "Mock") a Mocking Library for .NET Developers, that takes full advantage of .NET 3.5 (i.e. Linq expression trees) and C# 3.0 features. Here in this post I...
1
Comments

ASP.NET MVC tips: Routing Engine to aid SEO / 301 Redirect / Tracking by shahed

Routing Library resides in the System.Web.Routing Namespace of the .NET Framework 3.5, which provides us the flexibility to use URLs that has no mapping to a physical file. This means ASP.NET MVC framework provides flexible URL mapping engine and enables...
0
Comments

ASP.NET tips: Display resultset from Multiple DataTable by shahed

I normally do not use DataSet and prefer Objects instead generated by the ORM frameworks, but recently I had to produce a ASP.NET page that displayed a list of records from multiple DataTables. Lets look at a similar example. Lets assume we consume this...
1
Comments

ASP.NET tips: CustomBase class with Generic Class by shahed

All our ASP.NET pages must derive from System.Web.UI.Page class, but we can take the advantage of inheritance and create a Custom Base Class to manage Security, Session, Error Handling and other repetitive custom codes elegantly. We normally go and create...
0
Comments

Microsoft Chart Controls for ASP.NET and Windows Forms by shahed

Now Microsoft Chart controls Add-on for Microsoft Visual Studio 2008 can be used for charting needs. Prerequisite: Microsoft Visual Studio 2008 SP1 and Microsoft Chart Controls for Microsoft .NET Framework 3.5 . For sample Environment for Microsoft Chart...
0
Comments

Reflection Tips on Nested Classes: Use (+) plus instead of (.) dot with Assembly.GetType by shahed

Lets say we want to use reflection to generate a mock test case for this following Nested Class ClientAddress . When we load an assembly from a disk dynamically, we can use GetType to look up a type defined in the assembly. Example: Assembly assembly...
0
Comments

ASP.NET Tips: DropDownList.ClearSelection() to avoid "Cannot have multiple items selected in DropDownList" by shahed

Problem I was facing the following Exception when I was programmatically assigning Selected Value of a DropDownList with the following piece of code. ListItem item = DropDownListTest.Items.FindByValue("Test"); if (item != null) item.Selected...
0
Comments

Reflection Tips: Generate Mock objects for Test Cases. by shahed

Filling up Mock objects with random data is possibly one of the most time consuming and boring chapter of writing test cases. Let say we have the following classes and we want to write some mock objects. Mock Object Code Example private Client GetMockClient...
More Posts Next page »
Powered by Community Server (Commercial Edition), by Telligent Systems