Posts

Featured post

How to Solve Bootstrap Tooltip disappearing inside a updatepanel control when a button is click or in postback in ASP.NET

hi...today ill like to share how to keep bootstrap tooltip from disappearing inside a updatepanel. 1st always use  if (!Page.IsPostBack) { } on page_load if you are using a UpdatePanel in asp website/application. Ok lets add a UpdatePanel with two HTML input control and a Button.  <asp:UpdatePanel ID="up_save" runat="server">                                                             <ContentTemplate>                                                                 <div class="form-body">                                                                     <div class="form-group" style="margin-bottom: 4px;">                                                                         <label for="name" class="control-label">                                                                             Name                                                                         &

Call any JS Function from code in ASP.NET C#

Hi.....today ill share  how to call any js function from code in asp. Sample js code:  <script type="text/javascript">   function success() {             PNotify.prototype.options.styling = "bootstrap3";             PNotify.prototype.options.styling = "jqueryui";             PNotify.prototype.options.styling = "fontawesome";             new PNotify({                 title: 'INFORMATION',                 type: 'info',                 text: 'Item Retrieved Successfully.',                 after_init: function (notice) {                 notice.attention('bounce');                 }             }); } </script>  on your .cs code.   ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "success();", true); just copy the code and change the function name and paste it on onClick or page load events of your page. done..!Thank you. Enjoy Coding....and smoking. :)

Show Bootstrap Popup Modal from inside a Repeater in Asp.Net

Today ill show you how to add Bootstrap Popup Modal from inside a Repeater in Asp.Net. I feel AJAX Popup Modal is too 'heavy'! so i have found a way to use Bootstrap Popup Modal instead. Hope you guys like it..!! Add a Repeater control and bind it to a DataSource of your choice :   <asp:Repeater ID="Repeater1" runat="server">                                                             <ItemTemplate>                                                                 <tr>                                                                     <td>                                                                         <%#DataBinder.Eval(Container.DataItem, "SID")%>                                                                     </td>                                                                     <td>                                                                         <b>Name : </b&

Show Bootstrap popup Modal from code in Asp.Net C#

Hi, today ill show to how to show Bootstrap Popup Modal from code in asp. Here is a sample modal <div id="your_modal_name" class="modal fade animated" role="dialog">                                                                     <div class="modal-dialog">                                                                         <div class="modal-content">                                                                             <div class="modal-header">                                                                                 <button type="button" class="close"                                                                                     data-dismiss="modal">                                                                                     &times;</button>                                                                                

How to Upload Image to DB in SQL

Follow the steps below to upload Image to SQL in your Asp.Net website 1) Create a Table in you DB. CREATE TABLE [dbo].[CustomerDetails] (     [ID]           INT            IDENTITY (1, 1) NOT NULL,     [CustomerName] NVARCHAR (MAX) NULL,     [ Address ] NVARCHAR (MAX) NULL,       [Latitude]     FLOAT (53)     NULL,     [Longitude]    FLOAT (53)     NULL,     [Image]        IMAGE          NULL,     CONSTRAINT [PK_CustomerDetails] PRIMARY KEY CLUSTERED ([ID] ASC) ); 2) Create a new application. Add a FileUpload Control A Button. 3) In your Button click event  paste the code below. try             {                 if (FileUpload1.HasFile)                 {                     //getting length of uploaded file                     int length = FileUpload1.PostedFile.ContentLength;                     //create a byte array to store the binary image data                     byte[] imgbyte = new byte[length];                     //store the currently selected file in

How to show multiple markers on Google maps from database in ASP.Net

A simple way to show multiple markers on Google maps from database in ASP.Net using SQL and Repeater. Follow the steps below: 1) Create a Table in you DB. CREATE TABLE [dbo].[CustomerDetails] (     [ID]           INT            IDENTITY (1, 1) NOT NULL,     [CustomerName] NVARCHAR (MAX) NULL,     [ Address ] NVARCHAR (MAX) NULL,       [Latitude]     FLOAT (53)     NULL,     [Longitude]    FLOAT (53)     NULL,     [Image]        IMAGE          NULL,     CONSTRAINT [PK_CustomerDetails] PRIMARY KEY CLUSTERED ([ID] ASC) ); 2) HTML Markup and Google Maps Scripts <script src="http://maps.google.com/maps/api/js?libraries=places&key=YOUR-APIKEY-HERE"></script> <script type="text/javascript">          var markers = [          <asp:Repeater ID="rptMarkers" runat="server">          <ItemTemplate>                      {                          "title": '<%# Eval(" CustomerName ") %