I am a beginner in html and asp and i should write a program that when Username and password are admin and user click on the Button, the program opens a new asp page in otherwise the program shows Invalid username or password in table. I write this code but always when i click on the Button, the program shows new asp page ! I write this code in notepad.\[code\]<html><body><form method="post" action="Exam1.asp"><table cellpadding="20" border="1" align="center" style="text-align:left;"><colorgroup><col style="background-colorink"><col style="background-colorink"></colorgroup><tr><td><p>UserName:</p><p>Password:</p></td><td><input type="text" name="Username"><br><br><input type="password" name="Password"></td></tr><tr><td><input type="submit" value="http://stackoverflow.com/questions/14043119/Button"></td><td><%If Session("Username")="admin"&Session("Password")="admin" Then%><form method="post" action="Exam1.asp"></form><%Else%>Invalid username or password.<%End If%></td></tr></table></form></body></html>\[/code\]Thanks for help.Cheers