473,812 Members | 3,551 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Migration to 2.0: Textbox readonly problem

Hi,
We are currently upgrading our .Net web apps from framework 1.1 to 2.0
Everything is going quite smoothly except a bug with textbox value not
rendered when having propery readonly=true on the ASCX side.
explaination:
<asp:textbox id="TBDate" runat=server readonly=true></asp:textbox>
after the upgrade to Framework 2.0, the value of this textbox is always
empty string
TBDate.value always equals ""

The workaround we found is to set up the property on the vb side:
TBDate.Attribut es.add("readonl y", "readonly")
then the TBDate.value is well rendered on the postback...

Did anyboby encounter the same problem?
Does anybody has an explaination?

Cheers,

Thierry

Jul 6 '06 #1
1 1835
Hi,

I've blogged a small bit about it

http://aspadvice.com/blogs/joteke/ar.../12/16409.aspx

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Thierry" <th************ @eur.crowncork. comwrote in message
news:11******** **************@ 75g2000cwc.goog legroups.com...
Hi,
We are currently upgrading our .Net web apps from framework 1.1 to 2.0
Everything is going quite smoothly except a bug with textbox value not
rendered when having propery readonly=true on the ASCX side.
explaination:
<asp:textbox id="TBDate" runat=server readonly=true></asp:textbox>
after the upgrade to Framework 2.0, the value of this textbox is always
empty string
TBDate.value always equals ""

The workaround we found is to set up the property on the vb side:
TBDate.Attribut es.add("readonl y", "readonly")
then the TBDate.value is well rendered on the postback...

Did anyboby encounter the same problem?
Does anybody has an explaination?

Cheers,

Thierry

Jul 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
8298
by: pv_kannan | last post by:
Hello, I am stuck with a problem trying to mimic the behavior of a Windows Forms Readonly textbox in HMTL/ASP.NET. Basically, I would like the text to be readonly and overflow the textbox (overflow attribute) with the user being able to scroll thru the text using the arrow keys within the textbox. I managed to get the readonly and the overflow part to work but cannot figure out a way to let the user place the cursor within the box and
8
3530
by: tshad | last post by:
I cannot seem to get the asp:textbox to use classes. Style works fine. I am trying to set the textbox to act like a label in some instance so it doesn't have a border, readonly and the background is grey. I have a class set as: ..table2Label{ border-style:none; background-color:#F6F6F6; }
3
4093
by: Lyners | last post by:
I am having a hard time with this one, and I thought it would be easy. I have a datagrid in which I have textboxs for users to enter data. One of the fields in the database behind the datagrid tells me if the textbox is readonly or not. I am having a hard time setting the readonly property of the textbox with a conditional if statement (IIF). Here is the coding; <asp:TemplateColumn HeaderText="Data Entry"> <ItemTemplate>
2
1494
by: Eric | last post by:
I have a textbox on a form that is populated from the database when the form loads. When I check textbox.Text when the user clicks my submit button, the value is always what it was when the form loaded, no matter of what the user changed the text to. Any suggestions? protected void Page_Load(object sender, EventArgs e) { DataSet ds = Customers.GetCustomer(Request); if (ds.Tables.Rows.Count == 0) return;
4
1161
by: DS | last post by:
I am trying to migrate a vs 2003 asp.net application to vs 2005 and am having many problems. After dealing with 300+ compile errors after conversion now I have many run time error. I lot of them seem to be related to client script problems. Does vs 2005 handle client script differently than 2003? One of my problems is that some of my control events are not being called. For example I have a textbox control: <asp:textbox id=txtDate...
1
3880
by: Bonggoy Cruz | last post by:
We have a fairly big size ASP.NET web application that was written VB.NET. We are in the process converting the web project. We used the migration wizard included in VS 2005. I followed step by step guide outlined in here: http://msdn.microsoft.com/asp.net/reference/migration/upgrade/default.aspx?pull=/library/en-us/dnaspp/html/webprojectsvs05.asp. I was able to convert the project without any problem. Compiling and building them is...
4
4615
by: H-S | last post by:
Please help. This is a real puzzler! Originally posted on microsoft.public.dotnet.framework.windowsforms but no answer found! I have a read-only textBox which shows the results of a selection on another form. When the selection changes from the saved data, I wish to show it a different colour. As it is read-only the ForeColor property has no effect.
6
8383
by: Brandon McCombs | last post by:
Hello, I have a Form that contains some configuration information. One of the settings is for SSL. There is a checkbox that I want to check to make 2 textboxes un-editable so that a user can type information into the textboxes. If the SSL checkbox is unchecked the 2 textboxes should become readonly again. I have my event handler properly setup to listen for the CheckStateChanged event. My debug print statement prints out information
10
8653
by: moondaddy | last post by:
I have a textbox on a webform and based on certain conditions I wanted to prevent a user from editing its text. I dont like the look of the texbox when its disabled and was wondering if there is a different way to lock it with how hiding it and creating a label to look just like it. I was also going to do this server side. Thanks. -- moondaddy@newsgroup.nospam
0
9734
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10417
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10139
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9220
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5568
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5704
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4357
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3029
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.