kcherupa
Name: kcherupa
Score: 227.05
Last Seen: 1029 days, 10 hours, 5 minutes ago
Member Since: 6 November, 2009
DotNetShoutout
atom rss
5
Shouts

Detect request is from iPad in ASP.NET

published 1035 days, 8 hours, 8 minutes ago posted by PraveenPraveen 1036 days, 7 hours, 33 minutes ago
Tuesday, July 20, 2010 10:43:37 AM GMT Monday, July 19, 2010 11:18:14 AM GMT
iPad. People slowly liking it. Few days ago, I have written a post on how to detect the request is from the iPhone. So, as iPad applications are also growing day to day, I want to give you a small tip on how to detect requests are from iPad. So that you will write logic which is specific to the iPad like html, CSS, scripts etc. Detect request from iPad in ASP.NET [C#]: if(HttpContext.Current.Request.UserAgent.ToLower.Contains("ip... (more)
category: Web Dev | clicked: 4 | comment | | source: praveenbattula.blogspot.com
tags: iPad, ASP.NET
6
Shouts

Bubbling up events from user control to parent page/control

published 1168 days, 5 hours, 34 minutes ago posted by kcherupakcherupa 1169 days, 8 hours, 16 minutes ago
Tuesday, March 09, 2010 1:17:24 PM GMT Monday, March 08, 2010 10:34:44 AM GMT
It is a good practice to use user controls when same controls are repeated in many pages. But there are some cases where the user control has some controls which generate events and those need to be handled by the containing page/user control. For eample there is a button control in the user control and you want to do something... (more)
category: Web Dev | clicked: 0 | comment | | source: cherupally.blogspot.com
tags: user controls, Event, bubble up, Event Handler
4
Shouts

Schedule database backup for sql server 2005 using maintenance plan

posted by kcherupakcherupa 1172 days, 13 hours, 34 minutes ago
Friday, March 05, 2010 5:16:55 AM GMT
Scheduling a daily backup of sql server 2005 database using sql agent is very easy. By following below steps anyone can do that. Open sql server 2005 Management Studio and connect a serverExpand the tree (left navigation) ”Management->Maintenance Plans”Right click on node Maintenance Plans and Click “Maintenance Plan Wizard” (As shown in figure below) which causes to open a wizard. Follow the wizard In 2nd step of the wizard, You can schedule the task as clicking the Button “Change” as shown i... (more)
category: Data | clicked: 0 | comment | | source: cherupally.blogspot.com
tags: sql agent, recurrent, backup, Database, SQL Server 2005, Daily
5
Shouts

How to implement paging with LINQ

published 1182 days, 12 hours, 51 minutes ago posted by kcherupakcherupa 1183 days, 12 hours, 2 minutes ago
Tuesday, February 23, 2010 6:00:03 AM GMT Monday, February 22, 2010 6:48:52 AM GMT
Before going into how paging is implemented with LINQ, Let's discuss the need for implementing paging. With large amounts of data, it is not a good practice to pull all records from database when you are showing a fraction of them in one page. It is always recommended to use data on demand approach. When you want to show first 20 records out of the search results then you must get the first 20 records from database and discard the rest. Similarly when you want to show next 20 records of the search res... (more)
category: Agile | clicked: 0 | comment | | source: cherupally.blogspot.com
tags: Paging, C# 3.0, Linq
2
Shouts

How to create temporary table in sql server 2005?

posted by kcherupakcherupa 1225 days, 8 hours, 26 minutes ago
Monday, January 11, 2010 10:25:09 AM GMT
The syntax to create a temporary table is exactly same as the syntax to create a normal table. But the difference is the table name is prefixed with '#' (pound). By looking at the prefix '#' the sql server understands that it is a temporary table. The following code demonstrates how to create a temporary variable. CREATE TABLE #Customer ( CustomerID int identity(1,1), CustomerName varchar(100), CompanyName varchar(100), Address varchar(250) ) Important points about temporary tables: It is a... (more)
category: Data | clicked: 0 | comment | | source: cherupally.blogspot.com
2
Shouts

Table variables in sql server 2005

posted by kcherupakcherupa 1225 days, 8 hours, 31 minutes ago
Monday, January 11, 2010 10:20:26 AM GMT
Table variable is almost similar to the temporary table in sql server 2005. Table variables are replacement to temporary tables. The following syntax shows how to define a table variable. declare @Customer table ( CustomerID int identity(1,1), CustomerName varchar(100), CompanyName varchar(100), Address varchar(250) ) You can notice the syntax to define a table variable is similar to the syntax to normal table definition. declare keyword is used in place of create keyword. And table name is p... (more)
category: Data | clicked: 0 | comment | | source: cherupally.blogspot.com
7
Shouts

How to get Sql server 2008 intellisense working for new schema changes

published 1245 days, 8 hours, 31 minutes ago posted by kcherupakcherupa 1246 days, 7 hours, 15 minutes ago
Tuesday, December 22, 2009 10:20:21 AM GMT Monday, December 21, 2009 11:36:19 AM GMT
The new feature "intellisense" added in sql server 2008 is making my life easier. And I am enjoying this feature a lot. But I noticed many times that when we make any changes to DB schema like creating / modifying database objects we don't notice the schema changes in intellisense in the same session. This made me too bad and many times I cursed Microsoft for this inclomplete feature. But after making some research on this, I have found the solution to get intellisense for new schema changes in current ... (more)
category: Data | clicked: 2 | 1 comment | | source: cherupally.blogspot.com
tags: Auto Fill, SQL Server 2008, Cache, Intellisense, management studio
2
Shouts

Implementing Custom Paging, Sorting and Dynamic query in sql

posted by kcherupakcherupa 1252 days, 13 hours, 9 minutes ago
Tuesday, December 15, 2009 5:41:44 AM GMT
This post explains and demonstrates how to implement following things Custom Paging: Returning a set of records for the given page number and page size Dynamic query: Querying based on the where string passed thru parameter Dynamic sorting: Sorting based on the sort expression passed thru parameter SPExecuteSql: Executing sql statements included within parameters Common Table Expression: Similar to table variablefunction rownumber(): returns the current row number in a result setThe following code... (more)
category: Data | clicked: 8 | comment | | source: cherupally.blogspot.com
tags: Custom Paging, SORTING, Dynamic Querying
2
Shouts

Solving problems in configuring sql server for session mode 'sql server'

posted by kcherupakcherupa 1252 days, 13 hours, 22 minutes ago
Tuesday, December 15, 2009 5:29:10 AM GMT
Before going to details let me explain my experience on this. I was working on a project which pushed us to use bulky data in session. So we thought that it wouldn't be reliable to use the session in "InProc" mode as the asp.net worker process consumes lot of RAM and leads to crash the service. To avoid this we decided to use the session state in sql server mode. Telling the asp.net application to use sql server for session state is easy as shown below. But to make the above to work, we need to setup... (more)
category: Data | clicked: 0 | comment | | source: cherupally.blogspot.com
tags: SQL Server, session mode, Configures
2
Shouts

Easy way to strip time part in sql date time

posted by kcherupakcherupa 1252 days, 13 hours, 29 minutes ago
Tuesday, December 15, 2009 5:21:56 AM GMT
Most of the times we wouldn't want the time part of the dates to be stored or retrieved when dealing with only days. But the data type "datetime" in sql always includes the time even though you don't want it. There is no other data type in sql to store or retrieve the date without time. In this case we need to strip the time part from the date and store the remaining in database. To do this favor, I have come up with the below sql code which strips the time part from the date time. declare @date datet... (more)
category: Data | clicked: 0 | comment | | source: cherupally.blogspot.com
tags: time part, DateTime, SQL, strip
10
Shouts

How to create a setup project to install windows services

published 1256 days, 11 hours, 20 minutes ago posted by kcherupakcherupa 1258 days, 13 hours, 26 minutes ago
Friday, December 11, 2009 7:31:15 AM GMT Wednesday, December 09, 2009 5:24:44 AM GMT
This post assumes that you have knowledge on windows services and how to create a windows service using visual studio. People who don't know how to create windows service please learn here. Please follow below steps to create a setup project Create a visual studio solution with a project of type Windows Service as explained in http://cherupally.blogspot.com/2009/09/how-to-create-windows-service-in-dot.html. Add a new project of type "Setup Project" to the solution as shown below Once ... (more)
category: How To | clicked: 0 | 1 comment | | source: cherupally.blogspot.com
tags: Windows service, setup project, Visual Studio, C# .NET
9
Shouts

How to create a windows service in dot net framework

published 1256 days, 11 hours, 20 minutes ago posted by kcherupakcherupa 1258 days, 13 hours, 31 minutes ago
Friday, December 11, 2009 7:31:15 AM GMT Wednesday, December 09, 2009 5:20:20 AM GMT
Windows service is an application which always runs in background. We can view all the installed windows services in ControlPanel/Administrativetools/Services. Sql server, Oracle, ... are the good examples of windows service. Using visual studio it is very easy to create windows service. Please follow the below steps to create a windows service.Open visual studio and create a new project of template "Windows Service" as shown belowAfter you click OK in the above step you will see a new solution named... (more)
category: How To | clicked: 1 | comment | | source: cherupally.blogspot.com
tags: Windows service, Visual Studio, C# .NET
8
Shouts

How to find an element in c# Generic List

published 1256 days, 11 hours, 20 minutes ago posted by kcherupakcherupa 1258 days, 13 hours, 37 minutes ago
Friday, December 11, 2009 7:31:15 AM GMT Wednesday, December 09, 2009 5:13:43 AM GMT
The following sample code demonstrates you how to find a matching element in the object list. Let's say we have an object called Person with public properties PersonID, Name, Age, Gender as defined below. using System.Collections.Generic.List; public class Person { public int PersonID {get; set;} public string Name {get; set;} public int Age {get; set;} public bool Gender {get; set;} } class program { public static void Main(string[] args) { // Let's say we have a method de... (more)
category: Agile | clicked: 2 | comment | | source: cherupally.blogspot.com
tags: Generics, Find, C#, List, collection, Linq