Click here to Skip to main content
15,922,533 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: how i can make a lable visible =false when i press any key in the textbox Pin
_AK_17-Dec-07 19:18
_AK_17-Dec-07 19:18 
AnswerRe: how i can make a lable visible =false when i press any key in the textbox Pin
Gandalf_TheWhite17-Dec-07 19:17
professionalGandalf_TheWhite17-Dec-07 19:17 
GeneralRe: how i can make a lable visible =false when i press any key in the textbox Pin
Sherin Iranimose17-Dec-07 19:39
Sherin Iranimose17-Dec-07 19:39 
GeneralRe: how i can make a lable visible =false when i press any key in the textbox Pin
_AK_17-Dec-07 19:50
_AK_17-Dec-07 19:50 
GeneralRe: how i can make a lable visible =false when i press any key in the textbox Pin
N a v a n e e t h17-Dec-07 21:30
N a v a n e e t h17-Dec-07 21:30 
Generalcode to remember password in login form Pin
chithra.r17-Dec-07 18:33
chithra.r17-Dec-07 18:33 
GeneralRe: code to remember password in login form Pin
_AK_17-Dec-07 18:51
_AK_17-Dec-07 18:51 
GeneralRe: code to remember password in login form Pin
chithra.r17-Dec-07 22:57
chithra.r17-Dec-07 22:57 
hi
thanx for the assistance.by the way i tried with cookies in my application.but it is not working properly when there are many users.it is remembering the same password for all the users and giving error.iam providing the code with this for your reference.can you tell me how this code can be modified so that i can achieve the condition
<br />
 protected void btnlogin_Click(object sender, EventArgs e)<br />
    {<br />
        if (chkRemindPassword.Checked)<br />
        {<br />
            Response.Cookies["Password123"].Value = txtPassword.Text;<br />
            Response.Cookies["Password123"].Expires = DateTime.Now.AddYears(50);<br />
        }<br />
<br />
        if (Request.Cookies["Password123"] != null)<br />
        {<br />
            txtPassword.Text = Server.HtmlEncode(Request.Cookies["Password123"].Value);<br />
            Label1.Text = Server.HtmlEncode(Request.Cookies["ok"].Value);<br />
        }<br />
        try<br />
        {<br />
            if (txtUserName.Text.Trim() == "" && txtPassword.Text.Trim() == "")<br />
            {<br />
                lblinvalidentry.Text = "User Name & Password should not be Empty";<br />
            }<br />
            else if (txtUserName.Text.Trim() == "")<br />
            {<br />
                lblinvalidentry.Text = "User Name Should Not Be Empty";<br />
            }<br />
            else if (txtPassword.Text.Trim() == "")<br />
            {<br />
                lblinvalidentry.Text = "Password Should Not Be Empty";<br />
            }<br />
            else<br />
            {<br />
                int i = 0;<br />
                SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConStr"]);<br />
                string str = "select *from UserDetails";<br />
                SqlCommand cmd = new SqlCommand(str, con);<br />
                if (con.State == ConnectionState.Closed)<br />
                {<br />
                    con.Open();<br />
                }<br />
                SqlDataReader rdr = cmd.ExecuteReader();<br />
                while (rdr.Read())<br />
                {<br />
                    if (rdr["UserName"].ToString() == txtUserName.Text.Trim().ToLower() && rdr["Password"].ToString() == txtPassword.Text.Trim().ToLower())<br />
                    {<br />
                        i = 1;<br />
                    }<br />
                }<br />
                if (i == 1)<br />
                {<br />
                    Response.Redirect("sms_home.aspx");<br />
                }<br />
                else<br />
                {<br />
                    lblinvalidentry.Text = "Invalid User Name and Password";<br />
                }<br />
            }<br />
<br />
        }<br />
        catch (Exception exx)<br />
        {<br />
            exx.Data.Clear();<br />
        }<br />
    }<br />
<br />

pintoo

GeneralRe: code to remember password in login form Pin
Paul Conrad23-Dec-07 8:10
professionalPaul Conrad23-Dec-07 8:10 
QuestionHow can i? Pin
Member 464849117-Dec-07 17:43
Member 464849117-Dec-07 17:43 
AnswerRe: How can i? Pin
Christian Graus17-Dec-07 18:00
protectorChristian Graus17-Dec-07 18:00 
GeneralRe: How can i? Pin
Member 464849117-Dec-07 18:57
Member 464849117-Dec-07 18:57 
GeneralRe: How can i? Pin
Christian Graus17-Dec-07 19:34
protectorChristian Graus17-Dec-07 19:34 
AnswerRe: How can i? Pin
That's Aragon17-Dec-07 18:05
That's Aragon17-Dec-07 18:05 
GeneralRe: How can i? Pin
Member 464849117-Dec-07 18:38
Member 464849117-Dec-07 18:38 
AnswerRe: How can i? Pin
Gandalf_TheWhite17-Dec-07 18:33
professionalGandalf_TheWhite17-Dec-07 18:33 
GeneralSql Server Problem Pin
Member 464849117-Dec-07 17:36
Member 464849117-Dec-07 17:36 
GeneralRe: Sql Server Problem Pin
_AK_17-Dec-07 18:20
_AK_17-Dec-07 18:20 
Generalhighlighting text Pin
rajanandal17-Dec-07 17:29
rajanandal17-Dec-07 17:29 
GeneralRe: highlighting text Pin
_AK_17-Dec-07 18:23
_AK_17-Dec-07 18:23 
GeneralRe: highlighting text Pin
rajanandal17-Dec-07 19:05
rajanandal17-Dec-07 19:05 
GeneralRe: highlighting text Pin
_AK_17-Dec-07 19:06
_AK_17-Dec-07 19:06 
GeneralXML to HTML Pin
VanithaVasu17-Dec-07 17:22
VanithaVasu17-Dec-07 17:22 
GeneralRe: XML to HTML Pin
Christian Graus17-Dec-07 17:47
protectorChristian Graus17-Dec-07 17:47 
GeneralRe: XML to HTML Pin
VanithaVasu17-Dec-07 18:52
VanithaVasu17-Dec-07 18:52 

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.