When you design a modular ASP.NET application, soon or later you will need to think about adding extensibility features to your project so that it will be possible to add new modules at runtime. There are a few architectures and designs that let you develop an extensible application, like ASP.NET MVP. However, many of them [...]
Archive for the ‘ASP.NET’ Category
Pluggable modules for ASP.NET
Posted in ASP.NET, Architecture, C# on June 9, 2009 | Leave a Comment »
Creating a Captcha control – Part:2
Posted in ASP.NET, C#, tagged ashx, ASP.NET, C#, captcha, Control, generic handler, graphics, image, scrambled, text on April 9, 2009 | 2 Comments »
In this post I will explain how to generate a hard-to-read image out of our Captcha text. The new Captcha with image will look like this:
In MyCaptcha control, each letter is different from other ones in three properties:
1- Font
2- Size
3- Distance from the next letter (character spacing)
Therefore, I wrote a class named Letter [...]
Creating a Captcha control – Part:1
Posted in ASP.NET, C#, tagged ASP.NET, C#, captcha, Control, free, Source on April 9, 2009 | Leave a Comment »
In this post and a post after I will explain how to develop a Captcha control and use it in an ASP.NET web site.
As described in Wikipedia, A CAPTCHA or Captcha (IPA: /ˈkæptʃə/) is a type of challenge-response test used in computing to ensure that the response is not generated by a computer. [...]
Reading and writing images from/to database
Posted in ADO.NET, ASP.NET, C#, SQL SERVER, tagged ASP.NET, bind, Byte, C#, database, DataReader, DB, express, FILE, from, image, ImageUrl, Load, picture, read, Save, SQL, SQL SERVER, stream, System.Drawing, System.Web, System.Web.UI, System.Web.UI.WebControls, to, url, write on October 17, 2008 | 6 Comments »
Hi,
This post will show you how to save/load images to/from a database. This approach lets you do it without having to save the image on to disk. On a real hosting computer, you probably will not have write permissions. Therefore, it is sometimes vital to do image saving/loading on the fly.
In this post we will [...]
Querying WHOIS datbases int ASP.NET
Posted in ASP.NET, C#, tagged 43, asp.ent, C#, Dtabase, get, google, microsoft, microsoft.com, port, post, Query, server, tcp/ip, web service, webservice, Whois on October 13, 2008 | Leave a Comment »
A while back I was involved in developing a web site for a Domain and Hosting reseller. In that project I needed to create a “Find A Domain” section in which the customer could check to see if a domain name exists.
I made a exhaustive research and figured out that each Who is server maintains [...]
Dealing with REST Web Services
Posted in ASP.NET, C#, tagged .net, 3.5, ASP.NET, get, httpwebrequest, Linq, Load, post, rest, Save, service, StreamWriter, web, web service, webrequest, xelement, xml on October 10, 2008 | 2 Comments »
At the time of writing this post, .NET has no specific facility to work with REST services. Though, some services over the web provide information in REST format. For example, http://www.geonames.org (that provides gegraphic information) has a lot of free web services to get geographical information. The other day, I needed to use these services [...]
LinqDataSource with Select method!
Posted in ASP.NET, C#, tagged C#, fetch, Linq, LinqDataSource, LinqDataSourceView, Method, on demand, programatically, Select on September 28, 2008 | 5 Comments »
As I mentioned in the previous post, with Insert, Update and Delete methods but without a Select method, LinqDataSource control looks just like a chair with only three legs! Specially when it comes to situations that you have to retrieve records programatically.
I probed alot to see if there is a work around for this problem [...]
Sorting and ordering Linq results with string field names
Posted in ASP.NET, C#, tagged Field, IEnumerable, IQueryable, Linq, LinqDataSource, name, Order, Sort, SortExpression, String on September 10, 2008 | 4 Comments »
Hi,
Today at work, I had to bind a GridView control to a stored procedure through a LinqDataSource. To do this, I used LinqDataSource’s Selecting event. For example :
protected void LinqDataSource1_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{ e.Result = CustomersBiz.GetAll(); }
If we bind a grid to a store procedure, the grid and LinqDataSource won’t support sorting automatically. Therefore, to [...]