Click here to Skip to main content
14,607,020 members
   

ASP.NET

 
AnswerRe: Finding control using JS Pin
sashidhar14-Sep-09 23:07
Membersashidhar14-Sep-09 23:07 
AnswerRe: Finding control using JS Pin
sashidhar14-Sep-09 23:11
Membersashidhar14-Sep-09 23:11 
QuestionPassing parameter of length more than 4000 in sql server 2000 Pin
Jagz W14-Sep-09 21:05
professionalJagz W14-Sep-09 21:05 
AnswerRe: Passing parameter of length more than 4000 in sql server 2000 Pin
Christian Graus14-Sep-09 21:10
mveChristian Graus14-Sep-09 21:10 
QuestionFile Upload Control Problem in Google Chrome Pin
Shalini_U14-Sep-09 20:32
MemberShalini_U14-Sep-09 20:32 
AnswerRe: File Upload Control Problem in Google Chrome Pin
sashidhar14-Sep-09 20:52
Membersashidhar14-Sep-09 20:52 
Questionlocal processing of ssrs in asp.net Pin
sashidhar14-Sep-09 20:13
Membersashidhar14-Sep-09 20:13 
Questionhow to clear the page history when i logout from the master page?? Pin
shru_dhuri14-Sep-09 18:56
Membershru_dhuri14-Sep-09 18:56 
i has been created one login.aspzx page and one master.aspx page
when i login ,i m directly redirect to master page.master page contain logout button(linkbutten).
when clicked on logout button,the page has redirect to login page.
My problem is that,in that (after i clicked the logout button)when i clicked the "Back" it will move to master page.
i want clear the session or history?????



login.aspx page :

protected void buttonLogin_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(TextBox1.Text))
{ //Focus box before showing a message
// textBoxUsername.Focus();
TextBox1.Focus();
//MessageBox.Show("Enter your username", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
Response.Write("<script> alert('Enter your username');</script>");
//Focus again afterwards, sometimes people double click message boxes and select another control accidentally
TextBox1.Focus();
// textBoxUsername.Focus();
return;
}
else if (string.IsNullOrEmpty(TextBox2.Text))
{
// textBoxPassword.Focus();
TextBox2.Focus();
// MessageBox.Show("Enter your password", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
Response.Write("<script> alert('Enter your password');</script>");
TextBox2.Focus();
// textBoxPassword.Focus();
return;
}
using (DataTable dt = LookupUser(TextBox1.Text))
{
if (dt.Rows.Count == 0)
{
TextBox1.Focus();
// MessageBox.Show("Invalid username.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
Response.Write("<script> alert('Invalid username.');</script>");

TextBox1.Focus();
return;
}

else
{
//Always compare the resulting crypto string or hash value, never the decrypted value
//By doing that you never make a call to Decrypt() and the application is harder to
//reverse engineer. I included the Decrypt() method here for informational purposes
//only. I do not recommend shipping an assembly with Decrypt() methods.
string dbPassword = Convert.ToString(dt.Rows[0]["Password"])…
string appPassword = (TextBox2.Text);
//we store the password as encrypted in the DB
if (string.Compare(dbPassword, appPassword) == 0)
{
Session.Add("islogin", true);

Response.Redirect("Firstmain.aspx");

}
else


{
//You may want to use the same error message so they can't tell which field they got wrong
TextBox2.Focus();
// MessageBox.Show("Invalid Password", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
Response.Write("<script> alert('Invalid Password');</script>");
TextBox2.Focus();
return;
}
}
}
}





master page :

protected void Page_Load(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToLongDateString();


if ((Session["islogin"] == null) || (Session["islogin"] == ""))
{

Response.Redirect("frmLogin.aspx");
}



}




protected void LinkButton1_Click(object sender, EventArgs e)
{

Session.Remove("islogin");
Session.Clear();
Response.Redirect("frmlogin.aspx");

}



please send me response aor solution as soon as possible!!!!!!!!!!!!Confused | :confused:
AnswerRe: how to clear the page history when i logout from the master page?? Pin
Christian Graus14-Sep-09 19:35
mveChristian Graus14-Sep-09 19:35 
AnswerRe: how to clear the page history when i logout from the master page?? Pin
Christian Graus14-Sep-09 19:50
mveChristian Graus14-Sep-09 19:50 
QuestionLogin View Problem Pin
specialdreamsin14-Sep-09 18:54
Memberspecialdreamsin14-Sep-09 18:54 
QuestionForum development for application Pin
Sagar Singh Biswakarma14-Sep-09 8:40
MemberSagar Singh Biswakarma14-Sep-09 8:40 
AnswerRe: Forum development for application Pin
David Mujica14-Sep-09 8:58
MemberDavid Mujica14-Sep-09 8:58 
AnswerRe: Forum development for application Pin
soma198114-Sep-09 11:23
Membersoma198114-Sep-09 11:23 
AnswerRe: Forum development for application Pin
Christian Graus14-Sep-09 11:25
mveChristian Graus14-Sep-09 11:25 
QuestionHow do you send XML documents through a WCF Web Service? Pin
AndyASPVB14-Sep-09 8:29
MemberAndyASPVB14-Sep-09 8:29 
AnswerRe: How do you send XML documents through a WCF Web Service? Pin
Abhishek Sur14-Sep-09 9:21
professionalAbhishek Sur14-Sep-09 9:21 
GeneralRe: How do you send XML documents through a WCF Web Service? Pin
N a v a n e e t h14-Sep-09 16:03
MemberN a v a n e e t h14-Sep-09 16:03 
AnswerRe: How do you send XML documents through a WCF Web Service? Pin
N a v a n e e t h14-Sep-09 16:02
MemberN a v a n e e t h14-Sep-09 16:02 
QuestionJavaScript - Difference between document.write and document.writeln?? [modified] Pin
nowrocktheworld14-Sep-09 8:16
Membernowrocktheworld14-Sep-09 8:16 
AnswerRe: JavaScript - Difference between document.write and document.writeln?? Pin
Richard MacCutchan14-Sep-09 8:51
mveRichard MacCutchan14-Sep-09 8:51 
AnswerRe: JavaScript - Difference between document.write and document.writeln?? Pin
Abhishek Sur14-Sep-09 9:13
professionalAbhishek Sur14-Sep-09 9:13 
GeneralRe: JavaScript - Difference between document.write and document.writeln?? Pin
nowrocktheworld14-Sep-09 9:24
Membernowrocktheworld14-Sep-09 9:24 
GeneralRe: JavaScript - Difference between document.write and document.writeln?? Pin
Abhishek Sur14-Sep-09 9:56
professionalAbhishek Sur14-Sep-09 9:56 
GeneralRe: JavaScript - Difference between document.write and document.writeln?? Pin
Richard MacCutchan14-Sep-09 21:28
mveRichard MacCutchan14-Sep-09 21:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.