Posts

Showing posts with the label Button

Code for Data Export from GridView to Excel in Asp.Net- c#

In this blog, I am going to show how we could export our data from a gridview to excel sheet in Asp.net- c# (Export to excel data) First of all, just take a gridview on your design page and fill data as below :: protected void Page_Load(object sender, EventArgs e)     {         if (!IsPostBack)         {            BindGrid();         }     }     protected void BindGrid()     {         gvDetails.DataSource = this.getData();         gvDetails.DataBind();     }     private DataTable getData()     {         DataTable dt = new DataTable();         dt.Columns.Add("UserId", ...

Hide/ Show Password on button click by using JavaScript and Jquery

First of all add the below code inside your <head> tag ::  <script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.js"></script>   <script type="text/javascript">     $(function () {         $('#showpwd').hide();         $('#btnpwd').click(function () {             var txt = $('#btnpwd').val()             var pwd = $('#hidepwd').val();             if (pwd.length > 0) {                 if (txt == 'Show Password') {                     $(this).val('Hide Password');                     $('#showpwd').val($('#hidepwd').val());                     $('#showpwd').show();          ...
go to top image