>But by cookie it will just fill the values, the button will not be clicked and also if i have to pass a different username and password it will not work.
Your initialization code of the .ASPX page can handle it and proceed with anto login if you wish. If you need to have a different username and password, then, of course, you need to let the user enter it and allow him to initiate the login click when ready.