Posts

Google Map API Zoom The Marker Example

Image
Google Map API Marker is a powerful API to use for web page to mark on the map for example the location of your business office. This tutorial can use in all framework as long as the framework use html language to render the content to client side. You can refer here for more information of Google Map API Let see the example in asp.net framework. The Javascript to call map and marker var map; function initializeGMap() {            var Centre = new google.maps.LatLng(3.15681, 101.714696);             var mapOptions = { zoom: 12, center: Centre, mapTypeId: google.maps.MapTypeId.ROADMAP };             map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);             var KLCC = new google.maps.LatLng(3.15681, 101.714696);             var marker = new google.maps.Marker({ position: KLCC, map: map, title: 'Kuala Lumpur City Center' });          }         google.maps.event.addDomListener(window, 'load', initializeGMap); The Zoom Marker Script fu

XMLHttpRequest Example with Webservice asp.net

Image
AJAX is a group of interrelated web development techniques used on the client-side to create asynchronous web applications. If you want to retrieve information from server side and you do not want to fully post the entire page to the server side, you need to use ajax in your web page. This post show example how to use simple XMLHttpRequest Object in your web page to get the information from server side. The Javascript AJAX  <script type="text/javascript">         function createXHR() {             if (typeof XMLHttpRequest != "undefined") {                 return new XMLHttpRequest();             } else if (typeof ActiveXObject != "undefined") {                 if (typeof arguments.callee.activeXString != "string") {                     var versions = ["MSXML2.XMLHttp.6.0", "MSXML2.XMLHttp.3.0",                      "MSXML2.XMLHttp"];                     for (var i = 0, len = versions.length; i < len; i++) {

Integrate Timer with UpdatePanel to async page update - ASP.NET

Image
The Example show integration Timer with UpdatePanel to update page asynchronously. The ASPX Page   <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <!-- Interval time 5000 will be 5 second --> <asp:Timer ID="Timer1" runat="server" Interval="5000" ontick="Timer1_Tick"> </asp:Timer> <asp:Label ID="Label1" runat="server"></asp:Label> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /> </Triggers> </asp:UpdatePanel> <asp:UpdateProgress ID="UpdateProgress1" Displa

Problem with Session StateServer mode - ASP.NET

StateServer mode stores session state in a process referred to as the ASP.NET state service, which is separate from the ASP.NET worker process or IIS application pool. Using this mode ensures that session state is preserved if the Web application is restarted and also makes session state available to multiple Web servers in a Web farm. But new users are facing problems with this Session state mode. First, ensure to use StateServer mode, you must first be sure the ASP.NET state service is running on the server used for the session store. The ASP.NET state service is installed as a service when ASP.NET and the .NET Framework are installed. The ASP.Net state service is installed at the following location: systemroot\Microsoft.NET\Framework\versionNumber\aspnet_state.exe To configure an ASP.NET application to use StateServer mode, in the application's Web.config file do the following: Set the mode attribute of the session state element to StateServer. Set the stateConnectionString attr

How To Remove duplicate space within character - C#

This example show the method to remove duplicate space in data. You can use this method to remove duplicate space within the word. public string removeDuplicateSpace(string data) {     string _temp = data;     string reBuildData = "";     bool space = false;     foreach (char a in _temp)     {         if (a == ' ')         {             if (!space)             {                 space = true;                 reBuildData += a;             }                             }           else           {             reBuildData += a;             space = false;           }       }       return reBuildData; } Input :  Hello         World Output : Hello World  By Mohd Zulkamal NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)

C# Using StreamReader

You want to read a text file using StreamReader from the System.IO namespace in the C# language and base class libraries. With the using statement, which is ideal for this purpose, you can both perform actual file IO and dispose of the system resources. Tip: StreamReader is an excellent way to read text files. The using statement allows you to leave the file disposal and opening routines to the C# compiler's knowledge of scope. This statement will be compiled to opcodes that instruct the CLR to do all the error-prone and tedious cleanup work with the file handles in Windows.  StreamReader [C#] using System; using System.IO; class Program { static void Main() { // It will free resources on its own. string line; using (StreamReader reader = new StreamReader("file.txt")) { line = reader.ReadLine(); } Console.WriteLine(line); } } Note: when objects go out of scope, the garbage collector or finalization code is

Simple Tooltip with jQuery (only text)

Image
A tooltip is an interface component that appears when a user hovers over a control. They’re already present in most browsers. When you provide a title attribute for a link or an alt attribute for an image, the browser will usually display it as a tooltip when the user hovers over that element. By storing the text using the data command, i can recover and replace the link " title " later. The markup is really simple and flexible and adapts to many possible scenarios you might encounter. Must have a class " masterTooltip " which will launch the tooltip, and the tag " title " that will contain the text inside. The ASP.NET Image Button Controller <asp:imagebutton alternatetext="Delete user permenantly"  class="masterTooltip" commandname="Delete" height="20px"  id="BRemove" imageurl="~/Images/cross.png" runat="server"  title="Delete user permenantly" tooltip="Delete user pe