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 [...]
Read Full Post »
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. [...]
Read Full Post »
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 [...]
Read Full Post »
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 [...]
Read Full Post »
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 [...]
Read Full Post »
Posted in ASP.NET, C#, SQL SERVER, tagged ADO.NET, AppDomain, ASP.NET, C#, CurrentDomain, DataContext, Delete, GetAssemblies, GetCustomAttributes, GetExecutingAssembly, GetProperties, GetTable, GetTypes, Insert, Linq, LinqDataSource, name, PropertyInfo, record, Reflection, Retreive, Select, SQL, String, table, TableCellGetValue, Update, using on September 27, 2008 | Leave a Comment »
Hi,
With Insert, Update and Delete methods but without a Select method, LinqDataSource control looks just like a chair with only three legs! Such a powerful and flexible control is used to get connected to a DataBound control like GridView, while it could excel in many scenarios if it had a Select method! For example, it [...]
Read Full Post »
Posted in C#, SQL SERVER, tagged C#, Compile, Compiled Query, Linq, Linq to sql, Performance, Query, SQL on August 15, 2008 | 2 Comments »
There is no doubt that tehre are some drawbacks to Linq to Sql. One of them is that the Sql statement is built dynamically so it is needed to be parsed and compiled each time you run it. Fortunately .Net 3.5 has a solution for this problem. System.Data.Linq namespace includes a class named CompiledQuery which [...]
Read Full Post »
Posted in ADO.NET, ASP.NET, Architecture, C#, SQL SERVER, tagged 3-TIER, 3Tier, ADO.NET, Architecture, ASP.NET, C#, FirstReturnedRecord, IDENTITY, N-TIER, NTier, PAGING, ROW_NUMBER, SCOPE_IDENTITY, SQL SERVER, SQL SERVER 2005, StoredProcedure, TIER, UpdateRowSource on July 15, 2008 | Leave a Comment »
The Fill method we have developed so far, executes the Select command on the underlaying server and picks up RowCount records from startRowIndex position. For example, if Select * from Person returnS 20 rows, and startRowIndex is 0, only the first RowCount records will be fetched. This means that the complete result set will be [...]
Read Full Post »
Posted in ADO.NET, ASP.NET, Architecture, C#, tagged 3-TIER, 3Tier, ADO.NET, Architecture, ASP.NET, C#, DbCommand, DbConnection, DbDataAdapter, dbProvider, DbProviderFactory, N-TIER, NTier, System.Data.Common on July 14, 2008 | 3 Comments »
Hi again,
Let’s keep on going and work on the Data Access Layer. The DAL layer we are going to design can be used with, theoretically, any sort of RDBMS because it will take advantage of ADO.NET generic classes. For this reason, I have written a base class for DAL classes and have placed in [...]
Read Full Post »
Posted in ASP.NET, C#, tagged ASP.NET, C#, HiddenFieldPageStatePersister, Page, PageStatePersister, Reduce, Retrieve, Save, Session, SessionPageStatePersister, SessionState, Size, SQL SERVER, Store, ViewState on July 9, 2008 | 2 Comments »
ASP.NET uses ViewState in order to maintain the value of controls during post-backs. ViewState, by default, is stored in client side. Infact, objects that are ViewState-Enabled and their state is going to be saved, are serialized and stored in a hidden field. This works fine until the size of serialized objects is not too [...]
Read Full Post »