Friday, September 16, 2005

Writing A Custom Membership Provider for your ASP.NET 2.0 Web Site

If you have an ASP.NET Web site that stores any registration or log in information for your users, you probably know that the Membership provider in ASP.NET 2.0 uses a SQL Server Express 2005 database. But what if you want to use something else? This article will show you to use your own data source for storing membership information.

2 comments:

Jeff Barclay said...

First let me start by saying I have purchased several of your books and find them to be fantastic. You published an artical in devx.com about writing a custom membership provider in .net 2.0. Very helpful...

I was wondering if you could direct me on where to find information on running a client side script in the Login Control of ASP.NET 2.0.

I need to change the users input for the password field, to match that of a telephone keypad. example: abc=2, def=3, ghi=4, ect... I cannot find the field names for the login control, and no code behind in .net 2.0. The fillowing worked fine in .asp but no luck in .net

script language=javascript

function replaceChars(inputstr){
str0 = "0"
str1 = "abc2"
str2 = "def3"
str3 = "ghi4"
str4 = "jkl5"
str5 = "mno6"
str6 = "pqrs7"
str7 = "tuv8"
str8 = "wxyz9"
str9 = "1"
returnstr = ""

for ( i = 0; i <= inputstr.length - 1; i++)
{

if (str1.indexOf(inputstr.charAt(i)) >-1) returnstr += "2"
else if
(str2.indexOf(inputstr.charAt(i)) >-1) returnstr += "3"
else if
(str3.indexOf(inputstr.charAt(i)) >-1) returnstr += "4"
else if
(str4.indexOf(inputstr.charAt(i)) >-1) returnstr += "5"
else if
(str5.indexOf(inputstr.charAt(i)) >-1) returnstr += "6"
else if
(str6.indexOf(inputstr.charAt(i)) >-1) returnstr += "7"
else if
(str7.indexOf(inputstr.charAt(i)) >-1) returnstr += "8"
else if
(str8.indexOf(inputstr.charAt(i)) >-1) returnstr += "9"
else if
(str9.indexOf(inputstr.charAt(i)) >-1) returnstr += "1"
else if
(str0.indexOf(inputstr.charAt(i)) >-1) returnstr += "0"

}
alert(returnstr)
// document.subform.password.value = returnstr
}
/script


Any help you could provide would be greatly appriciated...

Thanks in advance, and keep up the excellent articals and books.

Jeff Barclay
Fire Fighter
Maryland, USA.

Ayisha said...

nice site for more books I have some more gifts..



Reference books

Books

Kitaben

books

Reference Books

tutorials

rapidshare tutorials

rapidshare books

MZWorld

Upload Books

MZWorld Library

Books Forum