Skip to main content

Posts

Showing posts with the label Microsoft

How to call a web method by JavaScript

I didn’t get a time to write something here for a long time. Yes I can say I was busy. (But I was not :)) Anyway I thought to write about something finally and I promise (this is a serious promise) that I will try to do something (do a posting actually) on my blog more frequently. The ability to call the web methods by JavaScript on .net is very very useful and we can implement the web pages more efficiently by using this. For example we do not need to send whole page and update. Yes this is AJAX (that what I think). Here is a web method example. It should be on the aspx page code behind and should be a static (shared) method. I have tried to insert the web methods on user controls and was unable to do so (if you know a way please share with us). This is on VB.net. _ Public Shared Function GetMyData(ByVal studentID As Integer, ByVal schoolID As Integer) As Student Dim studentService As New StudentService() Dim result As Student = studentService.GetStudent(studentI...

Sort Fields which contains both Numeric and Characters

It was a long time since my last post. Finally I got something to write about. Store Procedures … something I hate most of the time. But today I felt good about them because I was able to find a solution for a sorting issue. The particular column contained data like “98ABC-76543-DEF-12345-GHI 10 ” and also “GHJ 23 ”. I was supposed to sort this field on Numeric value for the last part in red . And for the other parts it should be treated as Numeric for the Numeric parts and as Strings for the others. So what should I do was to split all parts and sort them separately and get numeric part in red and sort. But wait a minute do we have to all the things??? I don’t think so... I have found ( actually one of my friends ) an easy way to do that. Here it is. SELECT [name], RANK() OVER (ORDER BY CAST(PARSENAME(modifiedName, 5) AS nvarchar ), CAST(PARSENAME(modifiedName, 4) AS INT ), CAST...

User Controls vs. Custom Controls

The first thing I have to do in here is to apologise for not posting something on this blog for a long time. Yes it was really a long time without any posting. There were some reasons for that like I had to go abroad (still I am at Canada, and it is a big experience). So I was new in here had lot of work to do. Anyway I hope to post regularly now onwards.  I have been on 2 projects in here (web applications). On one project it was designed to do by using more “User Controls” and the other one was using “Custom Controls” so first of all I was pretty confused with mixing these two approaches. In my mind I was like in a war to identify what is the better approach and thought to write about those a little. User Controls  Basically a User Control is like a normal aspx page only different I can see is the file extension is as ascx . We can make a user control and it has a code behind also. We can just build this as a web page and treat it as a normal web page on aspx. So we can have pro...

New Microsoft PC

Microsoft is going to put a PC to the market. They are going to make that PC compatible with Vista. It is true when the operating system looks nice then PC should also look nice. I think they are going to make that PC to take the hardware market also. It looks nice and let's see how will the performance. It is good to see that Microsoft is going to take the responsibility of getting "Don't Send" errors. Some company called Carbon Design Group has designed the PC. Here is the link for more information. Vista PC

MSBuild with Cruise Control.net

MSBuild is the process that runs when you hit the command "build" (F5) on Visual Studio IDE. On VS 2003 completely that was done by the IDE and it was a black box for the developers. But on VS 2005 when you create a new project you can see a .csproj (or .vbproj) file is created and when you open that file in any text editor you can see some XML tags on that. Actually those are the parameters that were sent to do the build. The idea behind this is you can change the build process of your project. The msbuild.exe file is at " (win drive :\) \WINDOWS\ M icrosoft.NET\Framework\v2.0.50727 ". The good thing in this is since msbuild.exe is included in .net framework you do not need an IDE to build your project. The solutions were deployed on a clean machine for testing and it have to be done daily on enterprise level solutions. And also on enterprise level solutions so many developers get involve and to minimize the conflict it has to use a version control system like VSS ...

Grab E-mail addresses

I thought to share a C#.net method that grab all the e-mail addresses from any file and It can be used for validation too.It returns an string array and I hope that you all can add some modifications on it and use it for any purpose you want. Here is the code. public static String[] readEmails(string file) { int k = 0; StreamReader SR = File.OpenText(file); String S = SR.ReadLine(); Dictionary myemails = new Dictionary (); string pattern = @"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"; Regex re = new Regex(pattern); while (S != null) { MatchCollection matches = re.Matches(S); if (matches.Count > 0) for (int i = 0; i You have to pass the file that contains the e-mail addresses as a parameter. For eg: F:\\date2.txt If you have come up with any problem in using this do not hesitate to put a comment and I hope I'll be able to answer you.

Customized Send To >>

I have found a little command that can add and remove the items on your " send to ". Normally when we right click and go to "send to" item we could see only some limited locations. But what's if we want to change it ?? It is very easy you just have to type the command "sendto" on Run which is located at start menu.Then it will prompt a folder which contains some items as on the image. (Example is given by using my machine) Then you just have to remove the items which you do not want to see on "send To" and paste the shortcuts of the locations that you wish to be added on "send To". After this right click on any folder and you will see new locations on the menu.

MyClipBoard :: A free & openSource project

It is happy to inform you about a free & open source project which was done by using C#.net. Arjuna is a wonderful person who works with us.He has been successful in developing a tool to manage windows clipboard and made it available to the community as free software including the source code. The tool developed by Arjuna is so simple and easy to use. Also it works with any application, unlike the Office clipboard tool which is restricted to the Office application suite. Objective behind this development was of to find ways and means to make one’s life easier (a very good intention) in day to day work assignments. Name of the tool is “ MyClipboard ” and the executables and the source code is available in SourceForge . Arjuna has written this using .net and windows clipboard API. The project details and downloads are available on http://sourceforge.net/projects/myclipboard . Here are the guidelines to use it as same as Arjuna said. Each time you place an item on the clipboard this i...

Image embedded mail by G-mail on C#.net

I have seen a posting on " indika-kumara.blogspot.com " how to send e-mails by using G-mail credentials on C#.net.Thank you Indika. Here I am going to tell you how to send e-mails on C#.net as well with embedded images.I have tried several ways on this and this is the way I found.If you know some easy way than this please tell me. First of all we have to write the code which simply send the e-mails.Here is the code which sends an simple mail. public static void sendEmail() { System.Net.Mail.MailMessage MyMailMessage = new System.Net.Mail.MailMessage( "from@gmail.com",//your gmail address "to@yahoo.com",// receiver "subject goes here", "content goes here"); MyMailMessage.IsBodyHtml = true;//enables HTML System.Net.NetworkCredential mailAuthentication = new System.Net.NetworkCredential( "from@gmail.com",//your gmail address "myPassword");//your gmail password ...

Code in .NET 2.0, Build for Java, Run on Linux!

"After 100+ person years and $12 million of direct R&D investment, and the cross-compilation of 4.7 M lines of code from .NET to Java ™ , we're celebrating the release of Grasshopper 2.0 . Our plug-in to the Visual Studio ® 2005 IDE enables you to produce .NET Web and server applications that run on Linux ® & other Java-enabled platforms, without having to rewrite your C# or Visual Basic code. Version 2.0 introduces support for the .NET Framework 2.0, ASP.NET 2.0 controls, role-based security, and C# generics." Thats what " http://dev.mainsoft.com/ " says about their product. " We all know and love the Microsoft ® Visual Studio ® IDE, but did you know that you can use it to build server applications that run on Linux ® ? Discover how you can build applications u...

Microsoft Windows Vista

I know that all of you know about the operating system called " Microsoft Windows Vista ". But I thought of write something that I feel about this.And to list some of its features. First of all there are some Windows Vista Editions as, Ultimate Home Premium Home Basic Business Enterprise Ok lets move into some technological manner on these O/S series.You can see a lot of technological information on wikipedia . Here are some features of the Microsoft Windows Vista,(you can read more on wikipedia by click on them) Windows Aero Windows Shell Instant Search Windows Internet Explorer 7 Windows Media Player 11 Windows Mail Windows Calendar Windows Photo Gallery Windows DVD Maker Windows Media Center Games and Games Explorer Windows Mobility Center Windows Meeting Space Shadow Copy Windows Update Parental controls Windows SideShow Speech recognition Windows Ultimate Extras And many more Yes you are now thinking what are the hardwares this O/S needs to run. Actually to give all th...

Macs do Windows, too

Mac lets you to install windows on their machines.This feature comes with the next major release of Mac OS X Leopard and if you want to try it now you can download it by the apple site which you can open by just click on the above image. You should have a Intel-based Mac computer to try this Boot Camp utility.Apple gives the drivers that needed for the Windows. This is going to be same as the dual boot on the PCs.This is allowing you to select the operating system when booting the machine.

Playstation 3 vs. Xbox 360

Microsoft Xbox 360 - Microsoft is positioning the Xbox 360 console as the center of a digital connected home - providing much more than just game play. The way they are talking about it, it almost seems like it could even supplanting the Media Center PC. Powered by a custom-made IBM PowerPC-based three-core chip running at 3.2GHz, and supported by 512MB of GDDR3 RAM, the new Xbox has the raw processing power to deliver more than all but the most hot-rodded PCs can today. Video and graphics performance is powered by a new ATI GPU running at 500MHz, with 10MB of embedded DRAM. Sony Playstation 3 - The big deal with the Playstation 3 is that it sports Sony's new Cell Processor that was jointly developed by IBM, Sony Group and Toshiba Corporation. It also features a new graphics processor (RSX) co-developed by NVIDIA Corporation and SCEI, and XDR memory developed by Rambus Inc. To really rub it in, it also adopts BD-ROM (Blu-ray Disc ROM) with maximum storage capacity of 54 GB (dual...

Microsoft Surface ???

Microsoft Surface represents a fundamental change in the way we interact with digital content.With Surface, we can actually grab data with our hands and move information between objects with natural gestures and touch. Surface features a 30-inch tabletop display whose unique abilities allow for several people to work independently or simultaneously.All without using a mouse or keyboard. You can view more information by click on the images.

Safari 3 Public Beta on Windows

Apple says " Now the world’s fastest, easiest-to-use web browser is available for Windows, too. " Apple default Internet browser Safari is now available on Windows also.I have faced in lot of troubles when projects have to be tested on Safari.We have to seek for Apple machines and configure them and a lot.M=Now its going to be easier because its now available on PC's also. By click on the image you can see the features of the Safari and I hope that you'll see the performance by downloading it and by doing some tests on it. Click here to download Safari for Windows.

Which Anti-virus Software is the best ???

I have used few Anti-virus softwares but it was hard to find which one is the best among them !!! And also I had no idea how to find a good Anti-virus and what are the categories should I look when ranking them.So I spent some hours on the internet and found some rankings on A/V softwares and thought of sharing it with you. Here are some categories that I have found, Ease of use Effectiveness Updates Feature set Ease of installation Help/Support And there are lot more like these I have found a site that describes all the things and ranking according to them for the year of 2007. Click here to see the ranking. And I have found another site that describes how is an A/V software works and how is the detection and prevention works. Click here to see how A/V Software works ....

MCMS Manager 6.2

I thought of writing a posting on a software which is very very useful when we are on MCMS(Microsoft Content Management Server) projects.I'm on such a project and you may agree with me if you have that experience.It is very very hard to modify a posting when something went wrong. But there is a solution for this it is MCMS manager 6.2. By using this it is very easy to manage postings on MCMS. And also it is an open source project. Here what MCMS manager people have to say >> " In Microsoft Content Management Server (MCMS) after the creation of the sites, to do modification to the postings there were no common way to do so. Mostly when something goes wrong with postings, it would be handy if there is a tool to analyze it. " Click here to download MCMS manager 6.2. And also Thank god its free & open source.You can download the source of it also in that site.

Is java or .net Better ???

I think both are good. It depends on the project you are on and the needs. .net gives a great flexibility over the language independence and java gives more on platform independence. Here are some useful links for compare both technologies. Orelly's Security onjava pros & cons web services on each