Yes you can set the value of a textbox.Text to be null, but upon retrieval, if the value is null, it will return back to you a String.Empty.
That is if you have not overriden the Text property of a Web.UI.TextBox. In case you really need to get back null for some reason or do whatever, you can extend the Textbox and provide your own implementation.
Bob Powell [MVP] wrote:
Re: Can TextBox.Text ever be null?
12-Apr-07
Ahh, hmmm, in fact a string variable _can_ be null
--
Bob Powell [MVP
Visual C#, System.Drawin
Ramuseco Limited .NET consultin
http://www.ramuseco.co
Find great Windows Forms articles in Windows Forms Tips and Trick
http://www.bobpowell.net/tipstricks.ht
Answer those GDI+ questions with the GDI+ FA
http://www.bobpowell.net/faqmain.ht
All new articles provide code in C# and VB.NET
Subscribe to the RSS feeds provided and never miss a new article
Jeff Johnson wrote:
EggHeadCafe - Software Developer Portal of Choice
WPF DataGrid Custom Paging and Sorting
http://www.eggheadcafe.com/tutorials/aspnet/8a2ea78b-f1e3-45b4-93ef-32b2d802ae17/wpf-datagrid-custom-pagin.aspx