Last post Mar 31, 2010 07:58 AM by abdulwakeel
Apr 25, 2006 02:10 PM|jmycr|LINK
Apr 26, 2006 01:48 PM|mbund|LINK
This is hard to answer without more information. What was the error you got? Is this in one aspx page or multiple aspx pages?
In VS05, aspx/ascx pages and their code-behind files are compiled into multiple assemblies. So if you have one page using inline code accessing a variable on another page, this might lead to an error.
FYI, if you have a complex VS03 web project to convert, you should consider using Web Application Projects. Check out
Apr 26, 2006 08:08 PM|jmycr|LINK
Apr 26, 2006 09:53 PM|jmycr|LINK
Apr 27, 2006 12:03 PM|chris_sisler|LINK
Apr 27, 2006 12:31 PM|kashif|LINK
ASP.Net does not accept changes made to the text of a ReadOnly TextBox sent from the client, the LoadPostData gets short circuited before the ‘Text’ property on the TextBox is reset using the post data in this
case. The change was made to ensure that ‘ReadOnly’ textboxes really behave as readonly. One workaround would be to make the textbox readonly by adding the attribute instead of using the Textbox control's property - something in the lines of
Apr 27, 2006 02:35 PM|chris_sisler|LINK
Oct 07, 2006 03:02 AM|Tarun.NET|LINK
Nov 14, 2007 05:59 PM|kimberlym212|LINK
Yes, I have found a work around for this problem. Instead of using the ReadOnly property for the asp.net textbox I used the html readonly property instead. In my code behind I set the readonly attribute of my textbox to true, i.e. this.txtTextBox1.Attributes["readonly"]
= true; or if I want to change back to readable in my code behind I change it back like this---> this.txtTextBox1.Attributes["readonly"] = "false";
I have also found the same issue with using the Enabled property of the TextBox. So instead I use the html disabled property on my code behind just as I did with the readonly html attribute.
visiblity: hidden or one that sets visibility: visible and then assign the CssClass to my TextBox either on the aspx page or in the code behind, i.e. this.txtTextBox1.CssClass = "textvisible"; or this.txtTextBox1.CssClass = "texthidden";
This seems to fix any issues with the data being lost or not being able to read it.
Hope you find this information useful.
Apr 02, 2008 11:32 PM|aki4u|LINK
Replacing asp TextBox with html TextBox (input) will solve this issue. Don't forget to put readonly="true"!.
Sep 08, 2008 10:22 AM|GOspina|LINK
Mar 31, 2010 07:58 AM|abdulwakeel|LINK
Use simple method