Monday, April 27, 2015

URL Routing to remove .aspx extension from URL in

Global.asax File:

static void RegisterRoutes()
System.Web.Routing.RouteTable.Routes.Add("login",new System.Web.Routing.Route("login", new RouteHandler("~/login.aspx")));
System.Web.Routing.RouteTable.Routes.Add("Main", new System.Web.Routing.Route("Main", new RouteHandler("~/Main.aspx")));
System.Web.Routing.RouteTable.Routes.Add("Message", new System.Web.Routing.Route("Message", new RouteHandler("~/Message.aspx")));

public class RouteHandler : IRouteHandler
string _virtualPath;
public RouteHandler(string virtualPath)
_virtualPath = virtualPath;
public IHttpHandler GetHttpHandler(RequestContext requestContext)
foreach (var value in requestContext.RouteData.Values)
requestContext.HttpContext.Items[value.Key] = value.Value;
return (Page)System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(_virtualPath, typeof(Page));




Sunday, May 4, 2014

Deploy ASP.NET application on Linux for iPad/Android

There are two option to enable .NET developers to extend their application deployment to Linux environments.

  1. MainSoft: Refer
  2. Mono Project: Refer

In MainSoft there is a  product, called Grasshopper allows ASP.NET, ASMX Web Services, and other server based applications to be compiled to Java bytecode and executed in a J2EE server running on Linux.

GrassHopper is a Visual Studio-based SDK and patented .NET to Java converter that enables you to run .NET Web and server applications to run on Linux® and other Java-enabled platforms.

For More Information Refer below link

Pl do comment if you want to know more.


Thursday, January 2, 2014

Wednesday, July 10, 2013

Turn browser window/tab into a notepad

paste the following line the browsers address bar


 the browser window/tab turns into a notepad

Tuesday, March 12, 2013

Script for creating a folder & taking a backup up in that folder

declare @name varchar(500)
declare @q nvarchar(MAX)
declare @foldername varchar(500)
set @foldername = 'D:\db backup\dbbackup_' + CONVERT(varchar,getdate(),110) + ''
--EXEC master.sys.xp_dirtree @DataPath
EXEC master.dbo.xp_create_subdir @foldername

set @name = @foldername + '\next_' + CONVERT(varchar,getdate(),110) + '.bak'
set @q = ' BACKUP DATABASE [Next] TO  DISK = N''' + @name + ''' WITH NOFORMAT, NOINIT,
 NAME = N''Next-Full Database Backup'', SKIP, NOREWIND, NOUNLOAD,  STATS = 10'
print @q
exec sp_executesql @q

set @name = @foldername + '\Mirror_test_' + CONVERT(varchar,getdate(),110) + '.bak'
set @q = ' BACKUP DATABASE [Mirror_test] TO  DISK = N''' + @name + ''' WITH NOFORMAT, NOINIT,
 NAME = N''Mirror_test-Full Database Backup'', SKIP, NOREWIND, NOUNLOAD,  STATS = 10'
print @q
exec sp_executesql @q

Sunday, February 10, 2013

Check Box in Crystal Report or MicorSoft Report.

The following Example shows how to Place a Check Box in Crystal Report

Steps to be performed :

1. Expand Field Explorer

2. Go To Formula's-> Right Click on that And New Formula

3. Give a Name to that Formula Editor

4. Now Editor will be displayed

5. In that Editor place the below Formula
if{Table.FieldName} = true Then

6. Close the Editor it will show save Prompt save the formula

7. Drag and drop your formula field to your crystal report
Right Click to format Object for that Formula-> Select Format Object

8. Go to Fonts Tab and Set Font as 'Wingdings' and Press Ok

9. Now check it will display if value is true then checked check box else un-checked checkbox.

Friday, May 25, 2012

New Elements in HTML5

The internet has changed a lot since HTML 4.01 became a standard in 1999.
Today, some elements in HTML 4.01 are obsolete, never used, or not used the way they were intended to. These elements are removed or re-written in HTML5.
To better handle today's internet use, HTML5 includes new elements for better structure, better form handling, drawing, and for media content.