|
Well, maybe this isn't weird, and it's relating to ASP.Net Webforms so of no relevance to most of you anyway... but even though I've been using ASP.Net webforms for donkey's years, this is something I'd not realised / understood until just now.
I have a form on which some of the fields may be disabled, depending on some rather complex logic. Some of the fields are disabled dependent on one of several statuses of a business object; others are disabled depending on a boolean flag that is available client-side. Some are dependent on both tests.
I was finding that when posting back, ONE of the fields was "losing" it's value, and the underlying database was getting an empty value. (Fortunately auditing at the database level was tracking the changes in values, so in those cases it happened in the live system I was able to restore via the audit trail. I knew it would be useful!) Debugging in VS it was apparent that although both fields were disabled (and had the disabled="disabled" attribute), one was empty right at the start of the page_load event, whilst the other had the value expected. I know that disabled fields aren't posted back as part of the HTTP post, but ASP.Net was "restoring" the value (I understand through ViewState). What I couldn't figure out was why ASP.Net was restoring some disabled fields, but not others.
Eventually I noticed that the one that had the expected value had aspNetDisabled in the CSS class attribute client-side (as well as my own class name). Investigating showed that ASP.Net adds this attribute when the field is set to disabled at the server.
It turns out that my code, which had evolved over years, had one set of "disabling" rules implemented server-side, by setting field.Enabled = false ... but the field that was returning blank, was getting set disabled CLIENT side. It therefore didn't have the aspNetDisabled CSS class.
By moving the client-side logic to disable that field across to the server, the CSS class was being set and ASP.Net was restoring the value from ViewState. (Fairly obviously, just adding the aspNetDisabled classname at the client won't do the trick, as the classname doesn't get posted back).
I know, it's one of those things I should have known, and I know, too, that I should be doing things like enabling fields consistently - either client-side or server-side. My original code did it server-side, but that involved writing a line of code for each control. The later additions did it client-side because there were quite a few controls involved, and it was much simpler to just add a CSS class to each one, then use JQuery to disable ALL fields with that CSS class.
|
|
|
|
|
Quote: A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines.
This isn't one of those times.
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
I’m begging you for the benefit of everyone, don’t be STUPID.
|
|
|
|
|
I can not believe how badly they have screwed the pooch on this. I've posted about this before and submitted bug reports and and they have done it yet again. With the 17.4.4 update (I think it was) Visual Studio's batch build option lost the ability to remember which of your build targets you want to build. They then fixed it a release or two later. With the 17.5.0 update it was broke again and fixed again at the next release. Yesterday they released 17.6.0 and this is broken again.
For me, this is a major pain in the backside. I have one solution with 24 projects, another with 40, and several more with 10. Now I have to waste a considerable amount of time selecting the desired build targets whenever I load one of those or I build them all and that wastes even more time.
I am so infuriated right now that I think I will wait until tomorrow to update my bug report. It won't matter very much because this is an issue raised by quite a number of people. One guy remarked that he gave up on it and has resorted to batch files. I am dang nearly at that point myself.
Actually, what I should be doing is waiting until I see what new and annoying bugs there are with each new release before I do any updates. I certainly will in the future.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
|
|
|
|
|
|
But hey, the icons are shiny!

|
|
|
|
|
I do not install the 17.{x}.0 updates.
Waiting for 17.{x}.4 or .5 updates brings less anger.
|
|
|
|
|
I have a little IoT audio development board - an AI Thinker ESP32 Audio Kit Version 2.2 rev 2957. The thing is supposed to able to be developed into an Alexa type device.
The problem with it is the documentation is maybe the worst I've ever seen. It claimed that the audio chip was an ES8388. It's an AC101, which isn't even similar.
Worse, there are at least 3 different versions of "Version 2.2" with different pinouts, none of which are specifically documented, requiring you to piece together snatches of old documentation, messageboard responses, and just random detritus from google and wave a dead chicken over the whole thing and maybe it will work.
I've been working on it all day and am not at the point where it produces sound yet. I can turn an LED off and on.
Would not recommend to a friend. Skip AI-Thinker and an get an Espressif LyraT board instead. Meh.
Edit: I got mine making sound finally but who knows how many boards this works for.
To err is human. Fortune favors the monsters.
modified 3-Apr-23 4:47am.
|
|
|
|
|
Quote: Possibly the hottest mess I've seen in some time
Word for word what I thought when I met my wife
GCS/GE d--(d) s-/+ a C+++ U+++ P-- L+@ E-- W+++ N+ o+ K- w+++ O? M-- V? PS+ PE Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
|
Don't you keep working on stuff like that just for the great feeling when you finally make it work?
Been there, done that, but not on that particulr board.
|
|
|
|
|
Don't know if this is what you're looking for but I bought one recently and it's a pretty decent device.
I was looking for an Alexa type device but not cloud based.
Audeme - Home[^]
|
|
|
|
|
Cool. I'm looking to avoid the Arduino ecosystem, as it's more bulky, pricey and less powerful than I'm used to as a general rule. I ordered a couple of different ESP32 based LyraT boards which are sort of gold standard boards for doing this sort of thing in the ESP32 world.
But yeah, that's basically what I'm doing. I intend to release a library for it, so maybe I'll end up supporting the Arduino boards down the road, but I'm really focused on the ESP32 line.
To err is human. Fortune favors the monsters.
modified 3-Apr-23 15:30pm.
|
|
|
|
|
I'm fixing to convert it to use with ARM, I going away from Arduino.
I'd eventually like to do some Home IoT stuff...if I ever get the time.
|
|
|
|
|
Mike Hankey wrote: if I ever get the time.
Time is such a precious commodity when you are retired ... sometimes I wonder how I found time to work
Mircea
|
|
|
|
|
You got that right.
I work more now than I did when I worked full time.
Difference is there's no pressure to get them done.
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Mike Hankey wrote: I work more now than I did when I worked full time.
Difference is there's no pressure to get them done.
Yeah, Ain't that the truth. I left salaried employment to start my own shop, but
I worked twice as hard as I did when I had an actual job!
Then I retired, or at least I drew my retirement, so now I only spend about 8 or 9 hours in front of the keyboard tinkering with projects that interest me!
|
|
|
|
|
DrWalter PE wrote: I worked twice as hard as I did when I had an actual job!
Then I retired, or at least I drew my retirement, so now I only spend about 8 or 9 hours in front of the keyboard tinkering with projects that interest me!
Yep, but lately I've had to finish some woodworking projects so it's taken me away from the keyboard, temporarily anyway.
Give me coffee to change the things I can and wine for those I can not!
PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com
Latest Article: Simon Says, A Child's Game
|
|
|
|
|
Microsoft wrote:
You can use wildcard characters (* or ?), to represent one or more characters of a file name and to display a subset of files or subdirectories.
The asterisk wildcard always uses short file name mapping, so you might get unexpected results.
You can use the question mark (?) as a substitute for a single character in a name.
-- dir | Microsoft Learn[^]
The question mark does not actually substitute for a dot/period/full stop (.) in a file name.
C:\Users\PIEBALD\AppData\Roaming>copy con foo_bar.txt
^Z
1 file(s) copied.
C:\Users\PIEBALD\AppData\Roaming>copy con foo.bar.txt
^Z
1 file(s) copied.
C:\Users\PIEBALD\AppData\Roaming>dir foo*bar.txt
Volume in drive C is Windows8_OS
Volume Serial Number is 528E-277C
Directory of C:\Users\PIEBALD\AppData\Roaming
2023-03-31 08:06 0 foo.bar.txt
2023-03-31 08:06 0 foo_bar.txt
2 File(s) 0 bytes
0 Dir(s) 28,516,610,048 bytes free
C:\Users\PIEBALD\AppData\Roaming>dir foo?bar.txt
Volume in drive C is Windows8_OS
Volume Serial Number is 528E-277C
Directory of C:\Users\PIEBALD\AppData\Roaming
2023-03-31 08:06 0 foo_bar.txt
1 File(s) 0 bytes
0 Dir(s) 28,516,675,584 bytes free
C:\Users\PIEBALD\AppData\Roaming>del foo*bar.txt
C:\Users\PIEBALD\AppData\Roaming>
As a further note, I have 8dot3 naming turned off on my personal system and I'll have to try this there.
Tested on Win10 as well as this old Win8 junker.
|
|
|
|
|
To be fair, they do warn you that the * uses the 8.3 filename. I guess the ? does as well.
Use dir /X to get the 8.3 filenames.
|
|
|
|
|
Yet the 8dot3 names don't seem to make a difference -- it behaves the same whether 8dot3 names are enabled on the volume or not. Or maybe it generates 8dot3 names on-the-fly as needed but doesn't store them?
|
|
|
|
|
The documentation you cite was proofread poorly. They refer to "dir t97\* " several times rather than "dir t97.* ".
Software Zen: delete this;
|
|
|
|
|
I'd just like to point out a gem I found underneath a semi-private portion of the ESP-IDF development framework.
The headers for it reside under a folder called "esp_private"
The magic sauce here is access to a very cool coprocessor of sorts. What it does is take a series of pins, which it then treats as bits - High = 1, Low = 0, like that.
Then you give it a clock frequency and a memory buffer, and that little coprocessor will traverse that memory buffer in the background flipping those pins off and on based on the data in the buffer you gave it. It all happens as rapidly as you need it to, and in the background.
You can use it to power things like RGB interfaced LCD controllers, Hub75 LED matrices, or anything else where you need a battery of digital signaling you can control with a byte buffer.
Very cool. Very undocumented. I'm busy hacking my way through it because while Espressif exposed a higher level RGB LCD panel interface that uses it under the covers, that doesn't work in my environment as the tech is very new. The older tech is incomplete and not functional in that capacity, but it's what I'm stuck with so I'm going to the metal myself. But that's not important.
The takeaway here is the amazing technology, and the fact that they're in no hurry to expose it to downstream consumers of the platform.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Very interesting.
How did you discover this undocumented functionality?
I'm a hacker (the good kind) and I'm always curious about how people find the stuff that is hidden.
Also, I'm working on a ESP32 thing right now because you advised that it would be a good platform for my BLE work. It's going really well and I can't believe I've finally made a break-thru.
Anyways, while looking at a small ESP32 dev board at amazon, I stumbled upon this picture from amazon that is absolutely hilarious[^]. Can you advise on that use of the ESp32 with those tweezers?
I believe he is trying to dip his ESP32 switches into the main board which will surely create a new computing platform. 
|
|
|
|
|
I was trying to figure out if the ESP LCD Panel API in the ESP-IDF went underneath SPI Master actually (it doesn't) but while I was there I was looking at their i8080 bus code, and saw it used this thing called GDMA and gathered what it did from context, at least in broad strokes. I then did a bit of googling around and found other people hacking it, using it to drive LED matrices and such.
I recommend the ESP32-S3 for all new development. At least until the ESP32-P4 is released. It has more pins, a more refined hardware architecture, including GDMA, and native USB 1.1 support, so you don't need to fab a serial UART USB bridge to program the damned thing. Just wire D- and D+ of your USB to pins 19 and 20 respectively.
To err is human. Fortune favors the monsters.
|
|
|
|
|
Very cool and thanks for the advice on the boards.
I'm just getting started and my first need is a device that supports BLE (i know many people hate Bluetooth, but every phone has it and this is an app that will be used by phones).
By the way, is there a good way to decide if a ESP32 supports BLE?
Or is that basically built-in/ always present like the wifi connection?
I know there are too many h/w companies to say for sure but is it basically an expectation of the platform? Just curious, I know BLE is not something you're interested in.
thanks
|
|
|
|