Friday, 29 November 2013

Detect Browser In Code Behind ASP.NET

Leave a Comment
Certain javascript will work on certain browser only. So inorder to avoid your client from using the application which is bot supported by your application, you can filter the browser type from code behind of your web application.   Let see the example The ASPX page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head...
Read More...

How to alter DataTable to add new Column -C#, asp.net

Leave a Comment
In this tutorial i will show how to manipulate the DataTable to append with new column. In this example i will retrieve data from database using SqlDataAdapter, you can refer this tutorial to know how to using SqlDataAdapter. After fill DataTable with data, the program will append the column of the DataTable. Lets check on the example below. The Database Table "Users" SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING...
Read More...

Get Method Names using Reflection [C#]

Leave a Comment
If you want to get method names of a given type in C#, you can use method Type.GetMethods. This method returns array of MethodInfo objects. MethodInfo contains many informations about the method and of course a method name (MethodInfo.Name). To filter returned methods (for example if you want to get only public static methods) use BindingFlags parameter when calling GetMethods method. Required are at least two flags, one from Public/NonPublic...
Read More...

Read data from DataTable - C#

Leave a Comment
This is the example of reading data from datatable : The code explaination : The code will retrieve data from database and store into databable. Andthen , the code will continue by looping each row in a datatable and try to read every column on the row. The Code     using System;     using System.Data;     using System.Data.SqlClient;     class PopDataset     {        static void Main()       ...
Read More...

Monday, 25 November 2013

Java - Get Visitor/Client ip address : JSP : Servlet

Leave a Comment
The previous post show how to get Visitor or client ip address in C# / ASP.NET . This post will show how to get ip address of client / visitor from jsp / servlet application. In order to make this method work, you need to test this method on the server and you are accessing the server from your computer. Otherwise you will get your local ipaddress or ::1 value. The getClientIpAddr Method      public static String getClientIpAddr(HttpServletRequest request) {         ...
Read More...

C# - Get Visitor/Client ip address : ASP.NET

Leave a Comment
If you want to get the ip address of users from asp.net web application when user access the web page, you can use this method to return the Client / visitor ip address. Method GetVisitorIPAddress - .Net 4 and above         /// <summary>         /// method to get Client ip address         /// </summary>         /// <param name="GetLan"> set to true if want to get local(LAN)...
Read More...

Sunday, 24 November 2013

Netbean : java.lang.OutOfMemoryError: Java heap space - Solutions

Leave a Comment
In java application development, sometimes your application will throw an exception run: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space     at com.classpackage.MainConsole.main(MainConsole.java:24) Java Result: 1 This is because your program consuming a lot of memory. One of the solutions is to increase the Xms and Xmx argument on the project. Lets see the example : The Main Class import java.util.ArrayList; import...
Read More...

SCRIPT5007: Unable to get value of the property '0': object is null or undefined - jquery.jqGrid.js

Leave a Comment
If you try to create data grid using mvc jqGrid and somehow the error above occur while debugging script using IE Debugger. Please follow this step to fix it.. The error because of in your mvc jqGrid coding, you not specify the json reader. Just add this line of code in your View and also in your mvc jqGrid . The Solution @{                 MvcJqGrid.DataReaders.JsonReader...
Read More...

Saturday, 23 November 2013

Simple Image Galery in PHP - Example

Leave a Comment
This post is a different from others post. because in this example i will use PHP language to create very simple Image Galery. The code will get list from image directory, and the build a image tag element in html to show the image. Very simple. Lets see the example. The  Project list Folder and file The PHP File  <html>     <body>               ...
Read More...

How to use PathGradientBrush WrapMode Property

Leave a Comment
Here The code To Create Page like picture above. The code behind protected void Button1_Click(object sender, EventArgs e)         {             Bitmap bmp = new Bitmap(600, 300);             Graphics g = Graphics.FromImage(bmp);            ...
Read More...

Javascript - Inline Code VS External Files

Leave a Comment
Inline Code <html> <head> <script type="text/javascript"> function a() { alert('hello world'); } </script> </head> <body> : : </body> </html> External Files <html> <head> <script type="text/javascript" src="/scriptone.js"> </script> </head> <body> : : </body> </html> scriptone.js function a() { alert('hello world'); } As you can see from the above example,  what is the advantage to put all script in one file and...
Read More...

Friday, 22 November 2013

Step by step how to create MVCJQGrid ASP.NET MVC4

1 comment
First step is to install MVCJQGrid in your project application(MVC). In This tutorial i will show you how to install MVCJQGrid using NuGet in Microsoft Visual Studio 2010. Install MVCJQGrid 1. In VS2010 open NuGet Manager. 2. Search MVCJQGrid and install the latest MVCJQGrid from NuGet Package Manager. Note : Recommended install latest version of JQGrid 3. Apply Installed NuGet Package into your project. Ok done the...
Read More...

Subscribe to our newsletter to get the latest updates to your inbox.

Your email address is safe with us!




Founder of developersnote.com, love programming and help others people. Work as Software Developer. Graduated from UiTM and continue study in Software Engineering at UTMSpace. Follow him on Twitter , or Facebook or .



Powered by Blogger.