I m using asp.net 3.5(visual studio 2008) and sql server 2005/2000.

I want code for validation of Account number and password. i.e. when user enter the Accountno and password and click submit button it should check the data with that enter in database. If it is correct it should go to next page otherwise show error message..

Also the account no should be of 12 charcters and password of 8 charecters.

Why not try the asp.net forum:)

Dont get you? Should it just be a simple condition?
If(textbox1.Text.Length>12 && textbox2.Text.Length>8)
sure you will also want it more then 0 as well, but it's the same theory anyways.

use RegularExpression validators or simply set textbox's maxlenght property to 12 and 8 respectively.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.