Click here to Skip to main content
15,891,906 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
XML
<input type="hidden" id="gwProxy" /><input type="hidden" id="jsProxy"  önclick="jsCall();" />
I'm new to ASP.net. I deployed my Web Application in IIS. Which is having the LoginForm.aspx as a first page.When i'm browsing it in IE, Login page is coming but it is not moving to the next page when i clicked the Signin button. But the same is working in Visual Studio 2008. Can any one help me to clear this problem. Thanks, Maria
XML
<input type="hidden" id="gwProxy" /><input type="hidden"  önclick="jsCall();" id="jsProxy" />
<input type="hidden" id="gwProxy"></input>
<input type="hidden" id="jsProxy"  önclick="jsCall();" />
Posted
Updated 11-Feb-10 6:08am
v6

Hi Maria,

It will helpful if you can post the code you have written on signin button. Are you getting any kind of error when you click on signin button?

Thanks,
Virendra Dugar 

 
Share this answer
 

Hi Virendra,<input type="hidden" id="gwProxy"></input><input type="hidden" id="jsProxy" önclick="jsCall();" />

Thanks for your Reply. below is the code, what i wrote on "SignIn" button.

protected void SignIn_Click(object sender, EventArgs e)
        {           
            string constr = ConfigurationSettings.AppSettings["MyLogin"];
            SqlConnection conn = new SqlConnection(constr);
            try
            {
                this.authendication();
                conn.Open();               
                if (pwd == Password_txt.Text)
                {                   
                    SqlCommand cm = new SqlCommand("select Designation from EmployeeMaster where EmployeeID = '" + EmpId_txt.Text + "'", conn);
                    SqlDataReader edr = cm.ExecuteReader();
                    edr.Read();
                    Design = edr["Designation"].ToString();                       
                    if (Design == "PM")
                    {
                        Response.Redirect("ProjectManagerForm.aspx");
                    }
                    else
                    {
                        Response.Redirect("TeamMemberForm.aspx");
                    }
                    edr.Close();
                }
                else
                {
                    Result_txt.Visible = true;
                    Panel3.Visible = true;
                    Result_txt.Text = "The computer is locked Because of Invalid EmployeeId";
                }
            }
            catch (SqlException exp)
            {
                //Response.Write("Enter the Correct EmployeeId / Password");
            }
            finally
            {
                conn.Close();
            }
        }

 
Share this answer
 
Man, while you are browsing in IE, did you get any error messages?(Note javascript error messages in IE statusbar if there), please mention it.
 
Share this answer
 
Ya check the error.did u write correct sql server related code for localhost?
 
Share this answer
 
Have you tried using the debugger to see what happens when your code runs ?


wrote:
I'm new to ASP.net


Then you should almost certainly not be writing any code that anyone will use in real life, especially a login system.
 
Share this answer
 
you shoud EDIT your post to add details, not post answers that are more questions

string constr = ConfigurationSettings.AppSettings["MyLogin"];
SqlConnection conn = new SqlConnection(constr);
try
{
this.authendication();
conn.Open();
if (pwd == Password_txt.Text)

What is pwd ? Do you have the same password for all users ? Does the authendication (sic) method set it ? The design looks terrible to me. Your site is about as insecure as it could possibly be.

{
SqlCommand cm = new SqlCommand("select Designation from EmployeeMaster where EmployeeID = '" + EmpId_txt.Text + "'", conn);

If this is not a student project, then I pity the fool who is paying for this terrible code. SQL in the presentation layer, no concern for SQL injection attacks, it's astonishing that people can still write code this bad. If you're teaching yourself, and writing code for fun, that's the only way this code is excusable. In that case, you have a lot to learn, you should read up on n tiered development and SQL injection. In my experience, it's not uncommon for people like you to be working on paid projects, and if you are, then you should contact the client and explain that you were lying when you said you could do this work. This code is fine for a first attempt by a beginner who is not in a class, but it is NOT acceptable for anything that will actually be used in the real world.
 
Share this answer
 
Hi Maria,

I couldnt get it why you are wrote this:

<input type="hidden" id="gwProxy" /><input type="hidden" önclick="jsCall();" id="jsProxy" />
<input type="hidden" id="gwProxy"></input><input type="hidden" id="jsProxy" önclick="jsCall();" />


in your question?


The imput tags used are HIDDEN here... so it must not be visible to you while viewing the login page. Is there something tied up with these html controls?

Would like to know whats the ASPX design. Please provide the needful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900