This is just for reference to get the URL based on HttpRequest Class.
You can call the method below :
Request.ApplicationPath : /virtual_dir
Request.CurrentExecutionFilePath : /virtual_dir/webapp/page.aspx
Request.FilePath : /virtual_dir/webapp/page.aspx
Request.Path : /virtual_dir/webapp/page.aspx
Request.PhysicalApplicationPath : d:\Inetpub\wwwroot\virtual_dir\
Request.QueryString : /virtual_dir/webapp/page.aspx?q=qvalue
Request.Url.AbsolutePath : /virtual_dir/webapp/page.aspx
Request.Url.AbsoluteUri...
Wednesday, 19 November 2014
Wednesday, 8 October 2014
Kentico 8.1 - Custom Upload Form Control [Solved to support custom table to store image/binary stream data]
Kentico is a powerful CMS engine that allow you to developed portal very fast. But when you have a really big data such as (10,000 above), you may need to think a different way to store the data(Not put all document as a Page Menu Item).
I have heard kentico have test their product for 100K document. But from my experience using shared server, it is cause a lot of painful if you want to expand the node in your page module, and even very slow to load the data.(That is my situation).
So after all, I have decided to developed...
Monday, 6 October 2014
Adding Dynamic Control from Code Behind - Dropdown, Listbox, Checkbox etc
This tutorial / example show how you can add dynamic control from code behind. This example not only limit to Dropdown, Listbox and Checkbox controls, but you can use this example for any controls. The only things that you need to understand the process.
Step By Step
Create one new project name DynamicControls
Add One web form or web form using master page if you use default template master page.
Copy paste code below respectively.(Note:...
Thursday, 21 August 2014
Await in Catch and Finally
This is just a brief note to publicize a coming improvement to the async language support.
With the new compilers, changes to the C# language (e.g., async/await) are easier than they used to be. One improvement that is coming is the use of await in catch and finally blocks. This enables your error-handling/cleanup code to be asynchronous without awkward code mangling.
For example, let’s say that you want to (asynchronously) log an exception in one of your async methods.
The natural way to write this is:
try
{
await...
Wednesday, 20 August 2014
HEX to ASCII and ASCII to HEX Class - C#
This article shows you how to convert string to hexadecimal and vice versa.
HEX TO ASCII Class
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualBasic; // I'm using this class for Hex Converion
namespace Hex_Converter
{
public class HexConverter
{
public string Data_Hex_Asc(ref string Data)
{
string Data1 = "";
string sData...
Message Box Class - Confirm,Error, Warning and Info - C#
A C# Snippet for creating Message Box with various type of message (Confirm,Error, Warning and Info).
Message Box Class
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace messageBox
{
public static class MsgBox
{
// Displays a Confirm type message box
// parameter name="sMsg" is The message you want to display
public static bool Confirm(string...
Convert Hex / Css String color to .NET Colour (RGB)

Have you facing problem to convert "#CCCCCC" to .NET Colour.?
Here is a solution to convert the CSS / Hex String to .NET Colour (RGB).
Conversion Class
using System;
using System.Collections.Generic;
using System.Text;
using System;
using System.Drawing;
using System.Text.RegularExpressions;
namespace Convert_Hex_String_to.NET_Color
{
public class ConversionClass
{
...
Saturday, 16 August 2014
Register winform app HotKeys - C#

Hotkey is a very useful shortcut for complex application. Sometimes we build application with much feature include in it hence will result of bad experience of end user because the feature dont have the shortcut keys.
Here is a sample to add shortcut keys or hotkeys for winform app in C# code.
GlobalHotkeys.cs
using System;
using System.Windows.Forms;
using System.Runtime.InteropServices;
namespace Hotkeys
{
public...
Monday, 4 August 2014
Get each table size in mssql database
This is the snippet to get each table size in the schema/catalogue database.
MSSQL Code
SELECT
t.NAME AS TableName,
s.Name AS SchemaName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
...
Wednesday, 30 July 2014
How to "PUT" and "GET" queue item IBM WebSphere Queue - C#
This is example C# code how to insert value into IBM WebSphere Queue, and Get The Queue value back.
You can use Queue to store some information to processed later without involve database. You can read more about IBM WebSphere queue in here
Put Message C# Code
MQQueueManager queueManager;
MQQueue queue;
MQMessage queueMessage;
MQPutMessageOptions queuePutMessageOptions;
...
How to get user name of logon windows user.
This Code shows how to get user name of log on windows user.
Here is the code :
C# Code
string a;
a = System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString();
MessageBox.Show(a.ToString());
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 ...
Friday, 4 July 2014
How to specify WhereCondition in Transformation - Nested Control - kentico 8, 7, 6
Before this i wonder how to pass some where condition in transformation repeater. So i ask the kentico guys and he give me a solution which i think i can share to the others.
So in your transformation you can specify the <script runat="server"></script> element. This is where you can pass the where condition.
Let see the example :
Transformation Code
<cms:queryrepeater id="repItems" ... DelayedLoading="true" ... />
<script...
Update Panel - Handle async partial-page state with client script
This is a sample script you can put at the master page. So that you dont need to have updatepanel progress every time you add the update panel in you aspx page.
Script
<div id="pageUpdating"></div>
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
function BeginRequestHandler(sender, args) {
//page is begin request, you can...
Monday, 23 June 2014
Javascript Clock example
This example show how to insert clock on the website which is not static clock, but like a digital clock.
Script for Creating Clock
<script type="text/javascript">
function updateClock() {
var currentTime = new Date();
var currentHours = currentTime.getHours();
var currentMinutes...
Tuesday, 3 June 2014
Who is connected to database - Sample Application C#
This is a sample application just to show who is currently connected into database MSSQL. The application actually just execute MSSQL command "sp_who" and show the data into datagrid.
Below is a screen shoot of the sample application.
Code Behind View Who Is Connected Form
public Form1()
{
InitializeComponent();
...
Kentico 7 - Get Specific document information
This post will show how to get specific document information using Transformation In Kentico 7.
Note : i have tested this method in kentico 7 only, donno if the other version will work.
You can refer this link to create new transformation method
Example :
You can use this method in your transformation let say you create new repeater and want to show the parent name of the binding document type data. In this scenario, the document type store under different parent node.
public string getDocumentInfo(string...
Wednesday, 14 May 2014
[SOLVED]Login failed for user ''. (Microsoft SQL Server, Error: 18456)
If you want to try to connect to database using sql authentication and the result is failed due to error code "18456" , here are the solution that you might want to try. I already solved the issue (in my case the problem because of the database did not set to allow sql connection to pass. So the solution is to enable the SQL Server authentication.
Enable SQL Server Authentication
Login to the SQL Server using windows authentication.
Right...
Wednesday, 7 May 2014
[SOLVED]Windows Phone 8 - Duplicate Files
Windows Phone users around the world have reported that their photos, videos or music automatically create multiple copies of themselves. When you delete a single copy, the rest of them don’t open. There have been ongoing discussions spanning across multiple Windows forums pertaining to the issue, but a real solution hasn’t been found yet.
This bug was probably introduced after GDR 2 update for Windows Phone and usually affects devices with external SD Card support. Some users have suggested that it might be because of the...
|
Mohd Zulkamal 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 Google+ . |
Powered by Blogger.