Skip to content
Loading
Show "registration successfully" after saving or modifying the timer
    1.   
    2.     class="auto-style3" colspan="2">  
    3.         "SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TblLoginConnectionString %>" OnSelecting="SqlDataSource1_Selecting" SelectCommand="SELECT DISTINCT * FROM [tblUser]">  
    4.       
    Also here it tells me there is an error
    0
  • Kiran Mohanty
    css 
    1. .successfully-saved {  
    2.     color: #FFFFFF;  
    3.     text-align: center;  
    4.   
    5.     -webkit-transition: opacity 3s ease-in-out;  
    6.     -moz-transition: opacity 3s ease-in-out;  
    7.     -ms-transition: opacity 3s ease-in-out;  
    8.     -o-transition: opacity 3s ease-in-out;  
    9.      opacity: 1;  
    10. }  
    Add this class to the label if you wish to see some slidding effect.
    0
  • Sachin Singh
    keep the lable text null in the aspx page and set it from code behind on Save and Update
    1. class="auto-style1">                
    2.                 
    3.                 class="auto-style2" colspan="2">                            Save/Update    
    4.                 
    5.                 
    6.                 class="auto-style6">    
    7.                     
    8.                     "Label2" runat="server" Font-Bold="True" ForeColor="#33CC33" Text="">    
    9.                     
    10.                 
    11.                 
    12.                 class="auto-style4">Name    
    13.                 class="auto-style5">    
    14.                     "TextBox2" runat="server" Width="175px" >    
    15.                     
    16.                 
    17.                 
    18.                 class="auto-style6">Password    
    19.                     
    20.                     "TextBox3" runat="server" Width="174px" >    
    21.                     
    22.                 
    23.                 
    24.                 class="auto-style6">     
    25.                     
    26.                          
    27.                 
    28.                

    1. protected void Button1_Click(object sender, EventArgs e)    
    2.         {    
    3.             SqlConnection cn = new SqlConnection("Data Source=DESKTOP-KH76KMV;Initial Catalog=TblLogin;Integrated Security=True");    
    4.             SqlCommand cmd = new SqlCommand("insert into tblUser (EMPNAME,PASSWORD) values (@EMPNAME,@PASSWORD)", cn);    
    5.             cn.Open();    
    6.             cmd.Parameters.AddWithValue("EMPNAME", TextBox2.Text);    
    7.             cmd.Parameters.AddWithValue("PASSWORD", TextBox3.Text);    
    8.             cmd.ExecuteNonQuery();    
    9.             cn.Close();    
    10.           Label2.Text="Saved Successfully";  
    11.         }    
    12.   
    13.   
    14.     protected void Button3_Click(object sender, EventArgs e)    
    15.     {    
    16.         SqlConnection cn = new SqlConnection("Data Source=DESKTOP-KH76KMV;Initial Catalog=TblLogin;Integrated Security=True");    
    17.         SqlCommand cmd = new SqlCommand("Update tblUser set PASSWORD=@PASSWORD where EMPNAME=@EMPNAME", cn);    
    18.         cn.Open();    
    19.         cmd.Parameters.AddWithValue("EMPNAME", TextBox2.Text);    
    20.         cmd.Parameters.AddWithValue("PASSWORD", TextBox3.Text);    
    21.         cmd.ExecuteNonQuery();    
    22.         cn.Close();    
    23.     Label2.Text="Updated Successfully";  
    24.   
    25.     }   
    +1