Winner
Winners see possibilities; Losers see problems.

Define login and password property for ASP.Net Login Component

Tuesday, 13 May 2008 19:29 by niyaznazari

To define if the password contains non alpah numeric character or not and minumum password length, you can add these lines to the web.config of your project:

<membership defaultProvider="CustomizedProvider">
      <providers>
        <add name="CustomizedProvider" 
             .....
             minRequiredPasswordLength="8"
             minRequiredNonalphanumericCharacters="0" />
      </providers>
</membership>

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

How to use SQL Server 2000 instead Sql Express as a database of Login Component in ASP.Net 2005?

Tuesday, 13 May 2008 19:20 by niyaznazari

SQL Express is the default Database when you use Login Component of ASP.Net 2005, for using SQL 2000 as your database, you can add these tags to your project web.config file:

<connectionStrings>
    <add name="MyDB" connectionString="Data Source=servername;Initial Catalog=dbname;User ID=login;Password=password" />
</connectionStrings>

 <system.web>
    <roleManager enabled="true" defaultProvider="CustomizedProvider">
      <providers>
        <add name="CustomizedProvider"
             type="System.Web.Security.SqlRoleProvider"
             connectionStringName="MyDB"
             applicationName="/website"/>
      </providers>
    </roleManager>

    <membership defaultProvider="CustomizedProvider">
      <providers>
        <add name="CustomizedProvider"
             type="System.Web.Security.SqlMembershipProvider"
             connectionStringName="MyDB"
             applicationName="/website"  />
      </providers>
    </membership>

....

</system.web>

Note: don't forget to fill the "applicationName" tag with your application name, empty applicationName may cause some problems.

Currently rated 1.3 by 4 people

  • Currently 1.25/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

How to change the color of an iframe scrollbar?

Thursday, 10 April 2008 06:34 by niyaznazari

The iframe uses the style of what ever its loading so the anything you want to load will need the iframe css inside of it.

<STYLE>
BODY {SCROLLBAR-FACE-COLOR: red; SCROLLBAR-HIGHLIGHT-COLOR: white; SCROLLBAR-SHADOW-COLOR: black; SCROLLBAR-TRACK-COLOR: black; SCROLLBAR-DARKSHADOW-COLOR: black; SCROLLBAR-BASE-COLOR: black}
</STYLE>

Currently rated 3.0 by 4 people

  • Currently 3/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , , , ,
Categories:   Web design
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Mail Component in .Net 2005

Thursday, 6 March 2008 07:16 by niyaznazari

To send an email with .net 2005 you can use "System.Net.Mail.SmtpClient" mailing component: 

  Dim obj As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient
  Dim Mailmsg As New System.Net.Mail.MailMessage

  Mailmsg.To.Clear()
  Mailmsg.To.Add(New System.Net.Mail.MailAddress("ToAddress"))
  Mailmsg.From = New System.Net.Mail.MailAddress("FromAddress"))
  Mailmsg.Subject = "email subject"
  Try
      Mailmsg.Body = "body your email"
      obj.Send(Mailmsg)
  Catch ex As Exception
      Response.Write("Error: " & ex.ToString())
  End Try

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

How to define a connection string to your Access Database when it is password protected?

Thursday, 6 March 2008 07:09 by niyaznazari

To Define a connectionstring to connect to a Access database when your database is password protected you can use this command:

cnStr="Provider=Microsoft.Jet.OLEDB.4.0; Data Source="+dbPath+"; Jet OLEDB:Database Password=yourdbpassword"

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Error : "Operation must use an updateable query."

Tuesday, 4 March 2008 10:22 by niyaznazari

WHen using Microsoft Access, you may have come across this erro:

"Microsoft JET Database Engine (0x80004005) 
Operation must use an updateable query. "

This error occurs because ADO is unable to write to the database for one of the following reasons:

1.The most common reason is that the Internet Guest account (IUSR_MACHINE), which is by default part of the "Everyone" group, does not have Write permissions on the database file (.mdb). To fix this problem, use the Security tab in Explorer to adjust the properties for this file so that the Internet Guest account has the correct permissions.

NOTE: When using Microsoft Access databases with ADO, it is also necessary to give the Internet Guest account Write permissions on the directory containing the .mdb file. This is because Jet creates an .ldb file to handle database locking. You may also need to give read/write permission on the "Temp" folder because Jet may create temporary files in this directory.

2.A second cause of this error is that the database was not opened with the correct MODE for writing.

3.Another cause of this error is that the "Read Only" setting may be checked in the Options page for this DSN in the ODBC Manager.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Shel Silverstein

Wednesday, 27 February 2008 20:41 by niyaznazari
"There Is A Voice Inside Of You
That Whispers All Day Long,
"I Feel That This Is Right For Me,
I Know That This Is Wrong."
No Teacher, Preacher, Parent, Friend
Or Wise Man Can Decide
What's Right For You- Just Listen To
The Voice That Speaks Inside."

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Shel Silverstein

Wednesday, 27 February 2008 20:38 by niyaznazari
Listen to Mustn'ts, child, listen to the Don'ts.
Listen to the Shouldn'ts, the Impossibles, the Won'ts.
Listen to the Never Haves, then listen close to me.
Anything can happen, child, Anything can be.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Oscars 2008 - Best Actress Winner

Tuesday, 26 February 2008 18:47 by niyaznazari
French actress Marion Cotillard (R) with her Academy Award for Best Performance by an Actress in a Leading Role for "Môme, La" (2007) at the 80th annual Academy Awards at the Kodak Theatre in Hollywood, California 24 February 2008.
   

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

How to swap an image with javascript?

Tuesday, 26 February 2008 18:31 by niyaznazari

When you have an image an you want to swap the image by clicking teh user, you can use this javascript code:

<html>

<head>
<title>Untitled 1</title>

<script type="text/javascript">
function swapImage(idx){
 var image = document.getElementById("imageToSwap");
 var dropd = document.getElementById(idx);
 image.src = dropd.src; 
};
</script>
</head>

<body>

....

<img id="imageToSwap"  alt="" src="images/img1.jpg" />

<img id="1"  border="1" alt="" src="images/img2.jpg" onclick="swapImage('1');"/>

....


</body>

</html>

 

Currently rated 1.0 by 1 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , , , ,
Categories:   Web design
Actions:   E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed