Posts

Showing posts from 2009

Set FileUpload control in ASP.Net 2.0 to Read-Only?

We can make the ASP.Net FileUpload control readonly by setting the ContentEditable property to false. <asp:FileUpload ID="fileUploadSri" ContentEditable="false" runat="server" /> The other way of achieving it by restricting users to type in any characters i.e. return false on key press, key up and on paste event to prevent users pasting any values directly. Refer the below code snippet that helps in doing that, fileUploadSri.Attributes.Add("onkeypress", "return false;"); fileUploadSri.Attributes.Add("onkeyup", "return false;"); fileUploadSri.Attributes.Add("onpaste", "return false;");

Uploading Files using FileUpload control in Update Panel in ASP.Net AJAX

By default, FileUpload control will not work inside an UpdatePanel control for uploading files using Asynchronous postback. This is because, the file uploading and file manipulations is restricted by default in client side for security reasons. Hence it is not possible to upload files using asynchronous postback in UpdatePanel. To upload files inside UpdatePanel control we need to rely upon a standard postback i.e. we need to set the button that is uploading the file to be PostBack trigger instead of AsyncPostBack trigger. This will initiate a normal postback whenever we click the upload button and it is possible to upload the file. Refer the below code for clear understanding, <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:FileUpload ID="fuUpload" runat="server" /> <asp:Button ID="btnUpload" runat="server" OnClick="bt

Windows 7 - Next OS

Windows 7 , the next client release of Microsoft will be available in 32 & 64-bit versions. Here are some things that you asked for in your Desktop OS: For end –users 1. Faster-Your system starts up, shuts down and resumes from standby faster, and your laptop’s battery lasts longer! 2. Touch- Multi touch, ink and gesture support along with handwriting recognition allow you to create exciting new input capabilities. Managing large number of windows is much easier, with intuitive touch gestures to view multiple windows at once and remove unwanted windows. 3. Faster Browsing- Build for the web with IE8, add rich media with Silver light and extend to rich client with WPF – using the same platform and tools 4. Explore and Share - With Windows 7 and Windows Live, you can easily manage your documents, pictures, movies and music, regardless of which PC they are stored on, and share them with your friends and family. 5. Search- Windows 7 includes all performance improvements from Windows Se

Probable Timeout problems in ASP.NET

I've been through almost all sorts of Timeout related issues with Asp.net web service development. I’d like put a check list here to remind myself and hopefully save some headache of yours. If use database, you may get ‘ System.Data.SqlClient.SqlException: Timeout expired ’: a: Check your connection string setting for ‘Connect Timeout’: I.e. connectionString="Data Source=SNYC14D11511;Initial Catalog=d_dbivt003;Persist Security Info=True;User ID= user;Password= Password; Connect Timeout=4200 b:Check your command object SqlCommand.CommandTimeout Property, it’s by default 30s Check you Web.config setting when you get error like ‘Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.’: …. executionTimeout="1200"/ > make sure your set 'compilation debug="false" as well to let timeout setting take effect. Check MSDN for details. Set your proxy class Timeout property (derived

ASP.NET 3.5 Specific Features

Please refer the following site for specific features of ASP.NET 3.5 http://www.devx.com/codemag/Article/38741

'Weakness of attitude becomes weakness of character' - Albert Einstein

The Japanese have always loved fresh fish. But the water close to Japan has not held many fish for decades. So to feed the Japanese population, fishing boats got bigger and went further than ever. The further the fishermen went, the longer it took to bring the fish. If the return trip took more time, the fish were not fresh. To solve this problem, fish companies installed freezers on their boats. They would catch the fish and freeze them at sea. Freezers allowed the boats to go further and stay longer. However, the Japanese could taste the difference between fresh and frozen fish. And they did not like the taste of frozen fish. The frozen fish brought a lower price. So, fishing companies installed fish tanks. They would catch the fish and stuff them in the tanks, fin to fin. After a little thrashing around, they were tired, dull, and lost their fresh-fish taste. The fishing industry faced an impending crisis! But today, they get fresh-tasting fish to Japan ..

Proud to be part of the Satyam company.

The day before all this mayhem started, all employees of Satyam were proud to be called as Satyamites and was wearing the Satyam tag displaying their esteem to others, and now due to this incidence most of the employees are feeling awkward to show the same Satyam tag in public. In our country some many unpleasant incidents are happening, but still we are proudly says we are Indians, then why not for Satyam? Proud to be a part of company, not only for Satyam every employee should proud of his company . If you commit a mistake then you can feel shy, if someone else does then why you? Think of it my friends. I am not from Satyam. Think broadly, we are educated and knowledgeable persons.

What we have learned from Satyam incident. . Moral

A day after, when the entire world is considering Mr. BR Raju as criminal let us just look around on what we should learn from this incident. Everybody must have read lots of stores including his own letter to board which was circling on the net. I am not going into the details of the letter but few other things beyond that. We all know Raju is the founder of the Satyam and with his abilities he took the organization to the one of the world’s best organization. We should really appreciate his efforts and today more than 75,000 families are depending directly or indirectly on this organization. We all should be very proud of him. While this process he forgot few basics and we just look into that. ·Owning a business: You can own a business only by having major shares in that. In no other manor you can own that for a long time. For may be any reason he and his directors sold the shares and they had faced the takeover threat. He used all the other tactics to be the kin

10 Ways to Benefit even in this Slowdown

Image
Today’s volatile marketplace has businesses in a fix. Companies are exploring all possible means to bolster their wafer-thin margins. With this background in mind, we have started an initiative (Control Costs) that looks at how businesses can control costs without cutting down on their technology budgets. What's the Control Cost Campaign? The Control Costs campaign is a 360-degree integrated campaign that involves : A nation-wide Print campaign that has started from early December 2008. This will reach out to decision-makers through national general interest and business magazines like India Today a