Yesterday I was writing about creating server controls in separate assembly. Today I will cover more complicated example then simple “Hello World!” control. My goal was to create text box that will take handler method to run when validation event will be triggered, and when validation fail will show appropriate message. Text box with builtin validation would be nice, since you always should validate user input, right? But lets start creating our control. Continue reading “Server controls in separete assembly part 2”
Server controls in separate assembly
In my project I wanted to create text box control with builtin configurable validation. ASP.NET definition in
.ascx file would get validation function by name. But I do not wanted to create just
.ascx file with text box. I could not then reuse that control in other projects and it certainly would be nice, right? Creating such server control from code is not hard, but maintainability of HTML code in C# (it cannot be done other way) is not good. It’s pain really. Why Microsoft would create way to automatically create C# code from
.aspx files is mystery for me. Continue reading “Server controls in separate assembly”
Handling Ajax errors in ASP.NET
Yesterday I wrote about issue with Ajax postbacks in application I am working currently. Problem was with buttons that was triggering
UpdatePanels to update asynchronously. After adding loading indicator I wanted to add error handling at client side. Continue reading “Handling Ajax errors in ASP.NET”
Global UpdatePanel loading indicator in ASP.NET
When I started working on application I am working right now, one of first things I noticed, that was not entirely wrong but was inconvenient: when user clicked on some button that triggers update panel you was not entirely sure it worked or not. Why? Because of three things: Continue reading “Global UpdatePanel loading indicator in ASP.NET”
Better algorithm for finding UpdatePanel that will be updated during page request.
Other day I was experimenting with finding which UpdatePanel will be updated during page post back.
I found out that my solution was not working correctly for complex triggers, like user controls with custom events, which will trigger async postbacks and update of panel.
Or for grids with buttons. It was big issue. Also it was not pointing to correct
UpdatePanel if name of control was not entirely unique (for example when you have multiple same custom controls on page). It would return first panel, even if it wasn’t updating. Continue reading “Better algorithm for finding UpdatePanel that will be updated during page request.”