Posts

Showing posts from May, 2009

How to Make Windows Service Using C# 2008

Image
I have an task to run a Stored procedure after every 30 minutes. My first choice is to create a job on Sql server. But I also have to write a log file along with the stored procedure. Now, my choice will be Windows service. Creating a windows service is a very easy task but how to deply...... let me explain how to work with windows service. Creating a program that can run in the background of the operating system has any benefits, this is very important as the program can run without a graphic user interface. Complex service that are to run are longer time, and without the need the user to login the system. Windows services are harder to develop, debug, and test. But if you software are to run in server that require to start up automatically with the server is turn on, Windows service is your choice. Creating your skeleton project in Visual Studio 2008 To create a Windows Service project in Visual Studio 2008, you must select from the Visual C# Windows Projects. Give your Windows Servi...

How to Debug JavaScript Using C#

Image
Client Java Script is one of the most important things in web development but not the best and easiest to develop. Building of bigger and more complicated scripts, especially using DOM model or form field values can cause a lot of frustration and head pain. Moreover, JavaScript debugging is not easy and obvious as should be. But there is a hope. Before start, we should ensure that client script debugging is not disabled in IE as it is by default. Suitable options are located on advanced tab of Internet Options where both script debugging checkboxes should be unchecked. Go to Tools>>Options >> and refer image below. You can also download code from http://www.4shared.com/file/106977680/64e2c2b2/DebugJavascript.html Now open your code and put Debugger; key word in your code. Refer image below Now run your code, on IE. You will find and window. Refer image below. Click yes to start debugging. It will take some time to open debu...

launch of Visual Studio 2010 and .NET Framework 4 Beta 1

Microsoft Launched Visual Studio 2010 Beta 1. For more information please visit http://blogs.msdn.com/jasonz/archive/2009/05/20/general-download-of-vs2010-net-framework-4-0-beta-1.aspx Can also download from http://msdn.microsoft.com/hi-in/vstudio/dd582936(en-us).aspx One new language suite F# http://msdn.microsoft.com/hi-in/fsharp/default(en-us).aspx The final release will take time to be launched. I really want to hear your feedback! I will definitely follow blog comments, but the best way to give us that feedback is through the Visual Studio 2010 / .NET Framework 4 Beta 1 site . You can get your issues and suggestions routed to the teams directly by going through this route.

Remote Desktop Access: Team viewer, Remote, Desktop, Sharing, Files Sharing, Data Sharing, Team Sharing, Team Meetings

Image
In today’s world of technology remote desktop sharing has become a common way of working on remote pc’s or servers. We all know how to access Remote desktop, but what if I have to share my desktop to give a demo of application or module or anything. Suppose I have to give a simple demo to a friend, like how to create a Power Point Slides. Now, the first idea is to create a document or to create a pictorial document or create a video and upload to youtube.com or some other alternate. But here is the solution. You can use Team Viewer http://www.teamviewer.com/download/index.aspx Install team Viewer to both the PC (From where you have to access and to which you have to access) Ask for the Id and password of the machine which you want to access. Now enter ID into box and click connect to partner. If ask for password provide password. Now, you can view desktop of your partner or friend. You can also take control into your hand. You can also view more option like file transfer etc. For mor...

How to use DateDiff Function in C#

How to use DateDiff Function in C#. As earlier in ASP and VB6 we have too may conversion and date time functions. After working for so many years, we all had become habitual of working with the same. We have almost all the functions available in c#. But, sometimes lost control on some functions. Like for datediff WE have to write so much code in C#. At this moment we just remember functions of VB. Now, say thanks to Microsoft… What we can use is:- Add a reference of Microsoft.VisualBasic and access the DateDiff function like following ex. long nYears = Microsoft.VisualBasic.DateAndTime.DateDiff(Microsoft.VisualBasic.DateInterval.Year, dt, dtNow, Microsoft.VisualBasic.FirstDayOfWeek.System, Microsoft.VisualBasic.FirstWeekOfYear.System); By using the reference of visual basic you can use any function of Visual Basic or vice-versa.

Client side validations in C# using javascript

Client-side validation uses the same error display mechanism as server-side checking. Validating input data on web pages is usually a function performed by the server. The web page allows the user to enter data, and when the Submit button is pressed, the browser wraps up the data into an HTTP request and sends it to the server. The server checks each data field to make sure it is valid, and if any problems are found, a new form along with error messages is sent back to the browser. Wouldn't it be much more useful if problems could be detected in the browser before a server request is made? This approach would provide two primary advantages. It would lighten the load on the server, and, more importantly, it would notify the user of a problem with a data field almost immediately after he or she entered the bad data. This supports the truism that errors are cheapest to fix the closer the detection is to the original creation of the error. For example, if there is a problem with a zip ...