I had an UpdatePanel inside a table.
The table width was set to 100%.
The TextBox width was set to 90%.
On a button click the text of the TextBox was changed. The page updates asynchronously as hoped but the text box width changed to be larger than the page width. I have read some forum posts and it seems that it is not possible to stop this for some reason.
Instead of setting the width of the TextBox we can set the Columns attribute instead. This is obviously not as good and will cause problems with differing font sizes but is better than any other alternative I have found.
I assume that this is a bug in the Ajax implementation, or possibly within the browser.
Thursday, September 20, 2007
Wednesday, September 12, 2007
ASP.NET Session State Variables NULL is the same as 0 for an integer
I set a session variable to Integer 0 and then tried to read it back in to an integer.
The result was a NULL value.
Writing the value as a string and then converting it when reading it back in solved the problem. I assume that 0 is the default initial value for an integer and so ASP did not bother to save it, although I haven't checked this. This would mean that other types would have the same problem.
The result was a NULL value.
Writing the value as a string and then converting it when reading it back in solved the problem. I assume that 0 is the default initial value for an integer and so ASP did not bother to save it, although I haven't checked this. This would mean that other types would have the same problem.
Subscribe to:
Posts (Atom)