Thursday, November 28, 2013

hide div after 5 seconds javascript

 function hidemsg() {

            setTimeout(function () {
                $("#" + '<%=lblSkillmsg.ClientID%>').hide('blind', {}, 500)
            }, 5000);
           
        }


you can set second also (5000 change to 6000 or etc.)

Friday, November 22, 2013

prevent a password input from clearing after submit asp.net

You require to set it again in page_load or in button click event like this :

string Password = txtPassword.Text;
txtPassword.Attributes.Add("value", Password);

get the value from radiobuttonlist through javascript asp.net

<form runat="server">
<asp:RadioButtonList ID="RadioButtonList1" runat="server" 
          RepeatDirection="Horizontal" RepeatLayout="flow" >
         <asp:ListItem Selected="True" Text ="Yes" Value="0"></asp:ListItem>
         <asp:ListItem  Text ="No" Value="1"></asp:ListItem>
      </asp:RadioButtonList>    </form>
<p id="button" onclick="getvalue()">click me</p> 
 
<script type="text/javascript">
function getvalue(){
 alert($('#<%=RadioButtonList1.ClientID %> input[type=radio]:checked').val());
}
</script>

Opps Part 1 : Abstraction

  Abstraction in C# is a fundamental concept of object-oriented programming (OOP) that allows developers t...