Click here to Skip to main content
12,816,406 members (30,184 online)

Button Click Event after deployment

Member 9291223 asked:

Open original thread
I have a small web application which is running well on my local machine but once I deploy my site to the server, all the other buttons click events are working except for one button event which is not firing:
public void checkpassword(object sender,EventArgs e)
        string password = txtpassword.Text.ToString();
        SqlConnection con = new SqlConnection(connect);
        SqlCommand command = new SqlCommand("matchpassword",con);
        command.CommandType = CommandType.StoredProcedure;

        SqlDataAdapter sqlDALogin1 = new SqlDataAdapter();
        DataSet sqlDSLogin1 = new DataSet();
        sqlDALogin1.SelectCommand = command;
        sqlDALogin1.Fill(sqlDSLogin1, "Password");
        string passwrd = Convert.ToString(sqlDSLogin1.Tables[0].Rows[0]["Password"]);

        if (password == passwrd)

            lbldisplay.Text = "Wrong Password";


<asp:Panel ID="Panel1" runat="server" CssClass="HellowWorldPopup2" Style="display:none">
             <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">

                     <asp:Button ID="BtnOK" runat="server" Text="OK" CssClass="lb-testright" OnClick="checkpassword"
                     <asp:Button ID="BtnCancel" runat="server" Text="Cancel" CssClass="lb-testleft" OnClick="redirecttorecords" />
                      <asp:Button ID="Button1" runat="server" Text="Cancel" Style="display:none" />
                     <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
                     <asp:TextBox ID="txtpassword" runat="server" CssClass="lb-textbox"
                         TextMode="Password" onfocus="clearContents(this);">Password </asp:TextBox>

             <asp:ModalPopupExtender ID="Modal_Password" runat="server"
               TargetControlID="Button1" PopupControlID="Panel1" DropShadow="true" >

This is working fine on my machine but what doesn't work when deployed.
Tags: C# (C#3.0)


When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100