How to post to a new aspx page  
Author Message
bslim





PostPosted: Visual C# General, How to post to a new aspx page Top

Hi all,

I had a log in screen where by I will validate the user name and password. Once the username and password is validated, I would like to post to a new page "test.aspx"

May I know what is the method to use

Thanks

NpgsqlCommand command = new NpgsqlCommand("select UserName from employee where UserName = '"+UserName+ "' and Password = '"+Password+"'", conn);

try

{

NpgsqlDataReader dr = command.ExecuteReader();

if (dr.Read())

{

lblErrMsg.Text = "success";

// how to redirect to a new page

}

else

{

lblErrMsg.Text = "failure";

}

}

catch (NpgsqlException NplSqlEx)

{

lblErrMsg.Text = NplSqlEx.Message;

}

finally

{

conn.Close();

}



Visual C#20  
 
 
Prasant Swain





PostPosted: Visual C# General, How to post to a new aspx page Top

Response.Redirect("test.aspx")