Quantcast
Channel: Pubu's Travel Blog
Browsing all 31 articles
Browse latest View live

How to display Row Number in SQL Select Query

Use ROW_NUMBER() function in MS SQL Server. Following is an example. SELECT ROW_NUMBER() OVER(ORDER BY Column1) as Row, [Column1], [Column2], [Column3],[Column4] FROM [TableName]

View Article



How to install SQL Server 2000 in Windows Vista

Normally Windows Vista doesn't support MS SQL Server 2000. Even though the best solution is to go for MS SQL Server 2005 or higher technology if you have any requirement to run MS SQL Server 2000 in...

View Article

How to find SQL Server name using a query

Use the following query.select @@servername-------------------

View Article

C#.NET : How to convert PDF document to byte array and byte array to PDF...

Converting a pdf document will be very helpful for you when you need totransfer PDF document over different remote applications. Use following method for it. Don't forget add reference to System.IO;...

View Article

System.ArgumentException: The directory name C:\Program Files\Microsoft...

When you run Unit tests in Visual studio and if your project have config files sometimes you may have face this kind of error when trying to run the unit tests after modifying config files.Therefore in...

View Article


Regular Expressions Library

I found a very good site which have various kind of regular expressions such as Date Time Validation Regular Expressions, etc. which are very useful for programmers.Following is the link of the web...

View Article

ASP.NET MVC Unit testing - Session Mocking with MOQ

If your MVC controller use session objects when you write unit tests and try to run them you will definitely get the error "Object reference not set to an instance of object" type error if you haven't...

View Article

ASP.NET MVC dropdown list selected item

I will show you how to load data to ASP.NET MVC dropdown list. Here I am using a Enumerable strong types for the items of the drop downlist as follows.public enum Language { Sinhala = 1, English = 2,...

View Article


Image may be NSFW.
Clik here to view.

How to Generate source documentation using Sandcastle

Sandcastle is one of the best tools of creating source documentation which are freely available. I found a very good tutorial written on How to Generate source documentation using Sandcastle. Following...

View Article


Jquery with ASP.NET mvc: How to call an action method when selected item...

In your View page imagine you have a dropdown list like this.)(ViewData["Names"] == null ? "" : ViewData["Names"]), new { @class = "smallDropdownList" })%>Following is the jquery function which...

View Article

How to solve problem in Jquery with ASP.NET mvc: When text box name have a...

In your Asp.NET MVC view page when you have a textbox name with a dot like above may be you have face the problem that your jquery function will not identify it's name.function enableTextBoxes(){...

View Article

C#.NET: How to to store a data collection in web.config or app.config and reuse

If we have some static data which are not to be stored in the database but should be in a place where we can edit when needed we add those data in a config file. (In web.config if it is web application...

View Article

Image may be NSFW.
Clik here to view.

How to add a TOC (Table of Contents) to Large Telerik Report with sub reports

At the moment I am writing this article (May 2010) Telerik Reporting doesn't support the TOC feature. So we have to manually implement that feature.I have used an open source .Net PDF class library...

View Article


How to prevent displying the page number in the first page of Telerik Report

If you have added the page number in the Report footer of your Telerik report, it is very easy to prevent displaying the page number in the first page. It can be done by preventing displaying the...

View Article

How to reset primary key indent to 1 when inserting new records (after...

First delete all the records of the data table where you need to insert new records. Then add following two rows(in bold) at the beginning and end of your data insert script as follows an run the...

View Article


Firefox is not displaying my photos in facebook, etc.

I faced a problem as in the topic that Firefox didn't display my photos in sites such as Facebook as thumbnails. I found what is the reason for it and got fixed.Open the Firefox browser. Go toTools...

View Article

How to programmatically create a WPF data grid column which only accepts...

Use the following two classes to create the number text box column.public class DataGridTemplateColumn DataGridNumberTextBoxColumn{ public DataGridNumberTextBoxColumn(Binding binding) { var factory =...

View Article


WPF data grid bound column for numeric values with solution to double tab...

This solution will solve the headache of pressing tab two times or mouse double click to make the grid cell editable. This solution can be customized to use with DataGridTemplateColumn as well. I have...

View Article

Error: "Cannot find one or more components. Please reinstall the application"...

May be you got the above error message when trying to load macro project in your Visual Studio after a Windows update or VS reinstall.Uninstalling Visual Studio 2010 also removes the Visual Studio...

View Article

C#.NET: How to format a decimal number to show thousand separator according...

See following sample which trying to format sample number 25400.decimal decimalNumber = 25400;string number = (decimalNumber).ToString("N0", CultureInfo.CurrentUICulture.NumberFormat);after formatting...

View Article
Browsing all 31 articles
Browse latest View live




Latest Images