Friday, June 15, 2012
Friday, December 9, 2011
Upgrade .NET 1.1 to .NET 4 - ReadOnly Textbox
I am talking about the TextBox which has the Read Only property assigned true not retaining the values or client side changes getting ignored across postbacks. There are certain blogs / articles which talk about it but for the benefit of those who get stuck with this, I am giving herebelow the steps to reproduce and the resolution for the same.
ASP.NET 2.0 had a design change by which a an
This behaviour is new in ASP.NET 2.0 and if you are migrating your ASP.NET 1.x applications you may find this a little annoying / worrying since the values aren't retained.
This is independent of whether you set the EnableViewState property for the TextBox to true or false. In fact the EnableViewState property for a TextBox doesnt make a difference since the values in a TextBox are maintained and retrieved from the Form's Collection and not from the ViewState.
However, there is a work around for the same. Instead of setting the "Read Only=true" property in the design you can enable the ReadOnly property of the TextBox through the Attributes collection in the code behind. To do that, remove the ReadOnly property from the TextBox declaration above. Then, in the code behind file, within the Page_Load add the following line of code:-
TextBox1.Attributes.Add("readonly", "readonly");
Now you will notice that when you run the page, the client side changes you make in the TextBox (via the Javascript) is retained across postback.
This behaviour is by design in ASP.NET 2.0 and it has been designed with the idea that a ReadOnly TextBox shouldnt be modified in the client side by a malicious code.
For more information check http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.textbox.readonly.aspx
Friday, September 16, 2011
TFS command to delete a branch
tf destroy $/
This cleans up branching history also.
Wednesday, September 14, 2011
TFS command to see workspace information
tf workspaces /format:detailed /server:servername workspacename
TFS workspace problem? Clean up user cache!
You have to clean up two places.
C:\Users\username\AppData\Local\Microsoft\Team Foundation\3.0\Cache
C:\Users\username\AppData\Local\Microsoft\VisualStudio\10.0
Friday, September 11, 2009
Thursday, July 23, 2009
VMware - Increasing the size of a virtual disk
Important information before you begin
Even though following the sections in this article provide steps to increase the size of your virtual disk, the size of the disk partition does not increase as observed inside the guest operating system. You must follow steps related to your specific operating system to increase the size of the disk partition(s). For more information, see Increasing the size of a disk partition (1004071).
Caution: VMware recommends that you back up your virtual machine before increasing the size of a virtual disks.
In all cases, confirm the following before increasing the size of the virtual disk:
- All snapshots have been removed.
- The virtual machine is powered off.
The procedure for increasing the size of a virtual disk differs between VMware products. Follow the section below that matches your product.
Instructional Notes
To follow the sections below, you may need to:
· Open a command or shell prompt.
· Navigate to the VMware application's installation directory.
· Locate the full path to a hosted virtual machine's virtual disk (.vmdk) file.
· Replace any reference to xxx.vmdk with the full path to the virtual machine's virtual disk.
Note: If you have multiple .vmdk files with the same base name, use the file that does not include -flat or -s0 in its file name.
Workstation / ACE Manager / Server / GSX
- Open a command prompt.
- Navigate to the product's installation directory.
- Type vmware-vdiskmanager -x 100Gb xxx.vmdk and press Enter.
Note: Replace 100Gb with the actual size of virtual disk that you want. You can also specify Kb and Mb .
VMware Player / ACE Instance
It is not possible to directly change the size of a virtual machine's virtual disk if VMware Player is being used or if it is an ACE Instance.
Alternatives to directly changing the size of a virtual disk from one of these VMware products:
· An ACE Instance's virtual disk size must be changed from the ACE Manager, and then repackaged and redeployed.
· A VMware Player's virtual disk size must be changed from a different VMware product.