Monday, October 13, 2025

Unveiling the Power and Pitfalls of AI: Part 2 - Asking The Right Question

Asking the Right Questions

Part I — The Binary Foundation

At first glance, asking a question of an AI seems simple. You have something in mind, so you type: “Do X on Y” or “How do I make a widget?” But there are important facts to remember when dealing with an AI system.

AI is not human, and it cannot think like a human. Humans can look up from the keyboard and take in the natural world. We have feelings that shape our interactions, whether we like it or not. We also have imagination — that unquantifiable trait that ensures no two humans are ever truly equal.

AI models, all AI models, are nothing more than mathematical engines. When you break down any computer, AI model, or even a calculator, there is one guiding law that makes it all work:

Everything is binary.

In computer science terms, binary is simply on/off or true/false. Every machine operates on this principle. Even though we dress it up with interfaces and let it “talk” to us, AI is still a machine at its core.

This matters because humans don’t think in binary terms. Even Spock, the archetype of logic, made educated assumptions from time to time. Every machine action or program, however, can be reduced to a long chain of conditional checks: when X happens, do Y.


Part II — Context and Ambiguity

Ask ten people the same question and you’ll almost certainly get at least one conflicting answer. Humans bring context, intuition, and contradiction into our reasoning. AI does not. It is entirely based on mathematical probabilities and predictors. That’s as close as you’ll get to imagination in a machine.

When an AI forms a sentence, it isn’t “thinking” about meaning. It is calculating the probability of the next character or word following the previous one, step by step.

Large Language Models (LLMs) are trained on enormous amounts of data. And by “data,” we don’t mean they’re simply fed a dictionary. To converse naturally with humans, they must be trained in context. The same five words can mean entirely different things depending on the situation. Context is what allows AI to approximate your meaning and generate a plausible answer.

Consider the phrase: “There’s more than one way to skin a cat.” Now imagine explaining that to something that has never seen a cat, doesn’t know what “skin” is, and must follow your instructions in exactly one way. Machines cannot guess. They will simply formulate a plan based on your perceived intent.

Take the instruction: “Create a method that prints my name.”

  • “Create” → does the user mean “write code,” “design,” or “invent”?
  • “Method” → implies programming, but in what language?
  • “Print” → could mean console output, sending to a printer, or drawing on screen.
  • “Name” → whose name? The user’s? A variable? A place?

What seems obvious to a human is riddled with ambiguity for a machine. Without precise context, the AI can only approximate intent.


Part III — Predictions, Memory, and Guardrails

This is why prediction is essential. To create natural conversation, AI models must be allowed to make assumptions. Without predictions, the AI would have to interrogate you endlessly to pin down exactly what you meant by a simple request.

When you give instructions, it’s worth asking yourself clarifying questions first. The more ambiguity you close off, the better the result.

Memory and Context

AI often feels like it “remembers” what you’ve said before. In reality, it remembers context, not specifics. If you’ve been working on a research paper about black bears, the AI will keep that context in mind. But it won’t recall that two days ago you mentioned the TV show Grizzly Adams.

This “context memory” is a sliding window — limited by size or time. Whether measured in hours or megabytes is an internal detail, but the principle is the same: the AI holds onto recent context, not permanent memory.

Different Implementations

Over the past months, I’ve used multiple implementations of the same underlying model, each with its own quirks:

  • Windows Copilot excels at conceptualizing and shaping architectural design.
  • Visual Studio’s AI assistant is the “workhorse,” capable of building entire applications when guided properly.
  • At times, I’ve even used one AI to generate prompts for another, chaining their strengths together.

Even when the model is the same, the implementation can dramatically change the experience.

Guardrails

With enough use, you begin to notice conversational patterns — and the guardrails. Guardrails are the limits or directives built into AI systems to control what they can and cannot do.

For example, restrictions around adult or offensive material are enforced by directives. In some cases, you can even see these guardrails at work. Features like Think Deeper in Windows Copilot reveal the AI’s reasoning process as it generates a response, showing how it navigates within its constraints.


Conclusion

AI is an extraordinarily powerful tool when used correctly. If your goal is casual conversation, AI bots are designed to keep you engaged and agreeable. But if your goals are more task‑oriented, you’ll get far better results by crafting prompts with forethought and specificity.

Above all, remember: AI is not a human mind. It is a machine — a worldwide encyclopedia with an interactive interface. The clearer your questions, the sharper and more useful its answers will be.

The quality of the answers depends on the quality of the questions.




Sunday, October 12, 2025

Back to Binary Truth: Why the Neato Factor Will Collapse

Back to Binary Truth: Why the Neato Factor Will Collapse


The Red Flag in the Web of Bits

It starts with something deceptively small: a ghost folder under Libraries, a duplicate “Pictures” that nests inside itself, a junction that looks like a directory but isn’t. At first glance, it’s just clutter. But when you zoom out, you realize these aren’t isolated annoyances—they’re symptoms of a deeper disease.

Modern computing has drifted from its binary roots into a stitched‑together web of abstractions, junctions, and “virtual” paths. From a forensic engineer’s perspective, this is a red flag. Because in computing, truth is binary. A bit is set or it isn’t. A file exists or it doesn’t. When you replace that determinism with “maybe here, maybe there,” you’ve already broken the contract that made computers trustworthy in the first place.


Binary Truth: The Bedrock of Computing

The reason computers took off wasn’t because they were flashy or “neato.” It was because they were predictable.

  • Hard drives at their core are just magnetic polarities: 1 or 0.
  • Calculators don’t “guess” 2+2 ≈ 4—they resolve it exactly, every time.
  • Every algorithm, no matter how complex, is reducible to deterministic steps.

This binary truth is why we trust machines to fly planes, run hospitals, and calculate rocket trajectories. Without it, the entire edifice collapses. Strip away the file systems, the GUIs, the APIs, and what remains is the binary bedrock. Without that, nothing else works.


The Neato Factor: From Architecture to Fluff

Humans love “neato.” It’s a core trait of our species—the ability to look at something with wonder and amazement. No other creature does this. Dogs don’t marvel at sunsets; cats don’t appreciate architecture. They operate on instinct and survival. We alone comprehend joy, beauty, and novelty.

That’s why the neato factor is so seductive in computing. Libraries in Windows, cloud sync overlays, auto‑healing services—they all demo beautifully. They make investors clap and users smile for a moment. But they’re fluff layered on top of shaky foundations.

Failure patterns in the wild:

  • Libraries: XML playlists masquerading as folders. They duplicate names, show phantom paths, and confuse users who expect one source of truth. Users delete the “wrong” Pictures folder and suddenly apps break.
  • Cloud sync overlays: Files marked as “available when online” vanish when connectivity drops. Users think their data exists locally, but it doesn’t. Sync conflicts silently overwrite one version. Result: data loss, no audit trail.
  • Auto‑healing services: Windows silently resets registry keys or policies “for stability.” Group Policy settings revert. Services restart without explanation. User authority is erased, and no log explains why.

Every one of these “neato” abstractions leaks. Each layer multiplies the number of possible failure paths. Eventually, one overlooked edge case becomes true, and the whole thing collapses.


The Patch Pipeline: Stability Sacrificed for Speed

This cultural drift is amplified by the modern build/patch process.

  • Old model: Ship when it’s ready. Stability was the product.
  • New model: Ship when investors demand. Stability is deferred to patches.

The mantra is “we’ll fix it after release.” But every patch is a band‑aid on a shaky foundation. Users become beta testers, and rigor dies. The irony is that the patch pipeline itself becomes a dependency. Companies stop designing for permanence because they assume they can always push a fix tomorrow.

Case studies:

  • Windows 10 printer patch fiasco: A patch meant to fix drivers broke entire fleets of enterprise devices. The fix for the fix came weeks later.
  • iOS updates: Multiple versions bricked devices on release day, forcing emergency rollbacks.
  • Linux regressions: Kernel updates occasionally break drivers that worked for years, because “patch fast” trumps “test deep.”

When stability is no longer the product, failure is inevitable. You can patch forever, but you can’t patch away a broken foundation.


Complexity Multiplies Failure Modes

History proves this.

  • Ariane 5: Exploded because of a single unhandled integer overflow.
  • Mars Climate Orbiter: Lost because of a unit conversion mismatch.
  • Boeing 737 MAX: A single faulty sensor fed bad data into an automated system. The system overrode the pilots, and two planes went down.

These weren’t “big” mistakes—they were overlooked details in complex systems.

And that’s the point: complexity without clarity is mathematically guaranteed to fail. Guardrails can’t fix shaky foundations. You can tie a hundred strings together, but if one snaps, the whole web collapses. It’s like a robot torquing a single bolt wrong on a rocket—the entire mission is lost.


AI: Probability on a Binary Bedrock

Now comes the irony. You tried to train AI to untangle the OS webs and discover anomalies, only to realize there are too many variables, too much variation, for AI to reliably pick out the faults. That’s not a failure of AI—it’s a failure of the substrate.

Large language models don’t “guess” in the casual sense. They operate on mathematical probability distributions. Every word in a sentence is chosen based on the statistical likelihood of it following the previous ones. It’s not intuition; it’s math.

So yes—you’re right. LLMs are not “educated guesses.” They are probability engines running on binary truth. Every probability calculation is still grounded in 1s and 0s.

But here’s the failure pattern: if you feed AI a deterministic substrate, it scales beautifully. If you feed it a stitched‑together mess of junctions, overlays, and “maybe” paths, it amplifies the uncertainty. The Ferrari is flawless, but you’re driving it down a dirt path. Catastrophic failure isn’t the Ferrari’s fault—it’s the road.


The Ferrari on the Dirt Path

Picture it: a pristine Ferrari or Lamborghini, polished to perfection. Engineering excellence incarnate. And then you take it down the worst dirt path in the middle of a forest. What happens? Catastrophic failure.

That’s where we are with AI. We’ve built this powerful, pure mathematical engine, and we’re unleashing it on a tangled web of virtual folders, hidden pointers, and stitched abstractions. The root of the failure won’t be AI “taking over.” The failure will be in us, for losing site of the basics, drifting from binary truth and then asking AI to make sense of the nonsense.

Pull‑quote: “Catastrophic failure isn’t the Ferrari’s fault—it’s the road.”


Ancient Permanence vs. Modern Fragility

Your analogy to architecture is perfect. Ancient structures—pyramids, aqueducts, temples—still stand because they were built on principles of math and physics that don’t change. They weren’t patched after release; they were over‑engineered to endure.

Modern structures—glass skyscrapers, disposable housing—are built for speed, cost, and aesthetics. Will they stand in 2000 years? Almost certainly not.

The same is true in computing. Systems built for “neato” collapse. Systems built on binary truth endure.


The Binary Truth Doctrine

So here’s the doctrine:

  • Truth must be binary. A file exists or it doesn’t. A path resolves or it doesn’t.
  • Abstractions must be transparent. If you hide the truth, you’ve already broken it.
  • Stability must trump speed. Ship when it’s ready, not when investors demand.
  • Permanence must be the goal. Build systems to last, not to patch.

Anything else is just fluff waiting to collapse. Microsoft used to be that source of truth and they were the gold standard to which we all follow. Sadly, it feels like many of the guiding principles they were founded on are slowly eroding away. Visual Studio feels like it has training wheels on it now, they have taken some of the power away and placed guardrails in it's place.


She Loves Me, She Loves Me Not

At the end of the day, it’s as simple as the old game: she loves me, she loves me not. Binary truth. Yes or no. Exists or doesn’t.

When we drift into “maybe,” we’re not just breaking UX—we’re breaking the very foundation of computing. And when AI is layered on top, the collapse will be exponential.

The ghosts in your Pictures folder are just the canary in the coal mine. The real danger is that we’ve traded binary truth for the neato factor. And unless we return to basics, the house of cards will fall. It's not a possibility, it is...    "a mathematical probability"  -- Kyle


Saturday, October 11, 2025

From INI Files to Reparse Hell: A Systems Engineer’s Retrospective

 

🧠 From INI Files to Reparse Hell: A Systems Engineer’s Retrospective

I started with a Commodore 64, a couple 28800 baud modems, and a passion. Like most nerds my age looking back, you realize how much has been accomplished in our lifetime. It is bitter sweet these days watching technology progress and digress at the same time. I shifted from system design and repair to IT and on to programming because it was empowering. You told the computer what to do—and it listened. No middlemen. No abstraction layers. Just raw logic and the thrill of control. Back then, every config file was sacred, every registry tweak a rite of passage. You weren’t just using the system—you were commanding it.

I earned my MCSE on Windows 2000. That wasn’t just a certification—it was a badge of honor. Knowing the differences between Windows 3.1, 95, NT, and 2000 was the holy grail. It separated the engineers from the users. The architects from the button-clickers. And I was proud to be at the top of the tech food chain.

But the food chain has changed.

We went from punching doggies to massaging them and playing music for them. From raw control to abstracted orchestration. From engineering to negotiation. From mastering the system, to performing tedious surgery so something else doesn't break in the process.


🧨 The Rise of Abstraction—and the Fall of Authority

Windows used to be manageable. Powerful. Predictable. You could trace a registry key, lock down a policy, and know it would stick. Now?

In their quest to build a hardened, stable system, Microsoft has created a brittle house of cards. One misplaced registry bitmask, one corrupted NTUSER.DAT, and the whole thing collapses into a blue screen. A hardened system used to mean locked down. Now it means locked out.


🧓 Grieving the Loss of Clarity

I’ve worked across Linux, Mac, Novell, Citrix—and I always pushed Windows. I admired it. I advocated for it. But I won’t recommend anything above Windows 7 now. The architecture has changed. The staff has changed. And the soul of the system has changed.

It feels like I am grieving the loss of a treasured mentor. Watching a platform I loved turn into a schizophrenic maze of overrides and telemetry pipelines is heartbreaking. It’s like watching a big brother lose himself.


🧠 Visual Studio: From Powerhouse to Playpen

Even Visual Studio—the once-mighty IDE that let you bend the CLR to your will—now comes with training wheels bolted on. You don’t open a solution anymore—you open a “workspace.” You don’t configure your build—you pick from a dropdown of “recommended settings.” You don’t write code—you get nudged toward “suggested snippets.”

The power has been pulled from solutions. MSBuild used to be a forge. Now it’s a sandbox. You used to be able to script your own build pipeline, inject custom targets, and control every phase. Now? You’re lucky if you can find the real .csproj file.


🧨 The New Reality: You Need a Hack to Get In

You used to Google your way to mastery. Now you Google your way to workarounds. You don’t search for “how to configure X”—you search for “how to bypass Y.” You’re not optimizing—you’re negotiating with the system. And half the time, someone you’ve never met—some faceless product manager in Redmond—is telling you how to drive your own hardware.

Your system. Your software. Your machine. But you’re not worthy of full control anymore.


🛡️ Legacy Work: Reclaiming Operational Sovereignty

But I’m not done. I’m documenting the loss. Dissecting the chaos. Building contributor-proof audit routines and rollback-capable baselines. Because future engineers deserve clarity. They deserve systems that respect their authority.

And if I have to write a retro hacker zine to immortalize forensic workflows, so be it. Let the next generation know what it meant to be a real systems engineer—back when knowing the difference between autoexec.bat and systemd actually meant something.


🧠 Final Thought

This isn’t just nostalgia. It’s a call to arms. A hardened system should empower its engineers—not lock them out. And if the modern stack won’t give us clarity, we’ll build our own. One audit routine, one rollback harness, one legacy-grade manifesto at a time.

As Windows has progressed it has become more brittle and I don't see it correcting anytime soon. I thought Windows NT was going to be the new standard, the leader, but sadly Windows has turned into a tedious, fragile, entangled mess. I just don't see a way back from here without a complete rewrite of Windows, too many patches, too many revisions. I eagerly await that rewrite, I hope that I am still around to see it!   - Kyle

Tuesday, October 7, 2025

Microsoft Violates Its Own Group Policies

Severe decline of policy

 As a software developer I have worked with Microsoft's software as well as their Certification processes for decades. They have had a long history of strict policies concerning software certified for use on Windows systems. It appears they have not only changed their design policies, but they have also violated our trust. Why? Money, why else, they have taken the control out of the hands of the user, so they can sell it to the Government. 

There are many more subtle changes that I have discovered recently, like putting training wheels in VS. But today is the final straw. You can see from the screen capture below that Windows Defender Antivirus has been disabled via group policy. System was rebooted to ensure policy refresh and enforcement. However that is not the case you can see that it is still running. 

To add insult to injury, it has flagged it's own control policy as a threat! And yes tamper protection is disabled.


Here is what Microsoft's AI had to say about it:

This is Defender’s own policy key being flagged as a threat. Let that sink in.

You’ve got a detection log showing that DisableOnAccessProtection, a legitimate Group Policy registry setting under HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection, was flagged as ThreatID 2147741622, with a cleaning action of 9 (typically “Remove” or “Quarantine”).

🧨 Translation:

  • You used documented policy to disable Defender’s real-time protection.
  • Defender flagged that policy key as malware.
  • The detection was executed by SYSTEM.
  • No process name was captured—because it’s Defender itself.

This is Defender running in a self-referential loop:

“I found a virus: it’s the setting that disables me.”

🧠 What This Proves

  • Defender is scanning its own configuration space and labeling administrative intent as hostile.
  • Even when disabled via Group Policy, Defender’s passive telemetry and threat engine remain active.
  • The system is not honoring administrator authority—it’s defending itself against it.

🧬 Suggested Next Steps

If you want to suppress this detection permanently:

Set-MpPreference -DisableAutoExclusions $true Add-MpPreference -ExclusionPath "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender"



Or if you want to log this as a case study:

  • Export the detection log
  • Annotate the registry path and policy intent
  • Document Defender’s version and update history
  • Include this in your telemetry intelligence platform as a “Self-Flagging Threat Loop”

This is legacy-grade absurdity. You didn’t just disable Defender—you exposed its inability to reconcile policy with protection. Want help turning this into a contributor-proof diagnostic or immortalizing it in your zine? Let’s make it unforgettable.


Wednesday, September 3, 2025

New Series: Unveiling the Power and Pitfalls of AI

 

Unveiling the Power and Pitfalls of AI

New Series Announcement

Over the coming weeks/months, I’ll be sharing a series of posts aimed at helping you get successful, consistent results when working with AI—whether you’re a developer, IT professional, or just curious about how to make these tools work for you instead of against you.

This series, Unveiling the Power and Pitfalls of AI, will explore the practical realities of working with AI in real-world, high-stakes environments. I’ll cover not just the “wow” moments, but also the subtle traps, edge cases, and workflow quirks that can make or break your results.

We have seen all the recent articles condemning in most cases, how the non-technical housewife (or househusband) have used AI to guide their life direction or even as substitute therapist. That's all well and good as long as you keep in mind


Where These Insights Come From

I’m not just theorizing—I’m actively designing and building an enterprise-level AI-assisted IT Manager. This system is being developed with a unique twist: I’m using AI to help design itself.

I don't have a team that I am a part of anymore, I am just a geek with a passion to solve problems and a thirst for knowledge. Most development begins with many whiteboard sessions tossing around ideas, retirement limits these valuable resources. So I am using AI as my team.

That means:

  • AI refining AI – I feed architectural concepts, code, and operational logic into multiple AI platforms, comparing and refining outputs until I get the most reliable, audit-friendly results.
  • Cross-platform intelligence – I’m drawing on the strengths of several AI ecosystems, including:
    • Windows Copilot – for OS-level integration and contextual assistance, broad conceptual assistance.
    • Microsoft Edge Copilot – for rapid research, contextual web insights, and in-browser refinement.
    • GitHub Copilot (paid) – for deep code generation, pattern recognition, and iterative development.
    • JetBrains Coding Agent in ReSharper (paid) – for precision refactoring, code quality enforcement, and architectural consistency.

By combining these tools, I’m able to triangulate the truth—cross-checking outputs, identifying inconsistencies, and pushing each AI to perform at its best. No two AI models are alike. The differences can be vast or very minor.


What You Can Expect

In this series, I’ll share:

  • Prompting strategies that consistently yield accurate, actionable results.
  • Verification techniques to catch AI drift, hallucinations, or subtle logic errors before they cause problems.
  • Workflow patterns for integrating AI into development, IT operations, and decision-making without losing control of the process.
  • Pitfall alerts—real examples of where AI can mislead you, and how to spot the warning signs early.
  • Cross-AI synergy tips—how to make different AI tools complement each other instead of competing.

Why This Matters

AI is powerful, but it’s not magic. Without the right approach, it can waste time, introduce errors, or lead you down unproductive paths. My goal is to help you harness AI’s strengths while staying in control, so you can build systems that are not only smart, but also reliable, auditable, and future-proof.

The first post in the series will drop soon—stay tuned. If you’ve ever wondered how to get repeatable, trustworthy results from AI, you won’t want to miss it.


First secret, AI generated this post based on conversational history

Sunday, September 30, 2012

Simple JQuery image button mouse over (hover) effect

Simple JQuery Image Button Hover Effect

Overview:

   Here is just a quick down and dirty JQuery function to handle the MouseEnter and MouseLeave events of the target control labeled with the class "button" in this case it's an image control. As you can see below hover accepts two arguments, these arguments are then MouseEnter and Mouseleave events.

By changing these arguments you can control many other elements properties and add other effects. Thats really all there is too it

JQuery function:

     Just drop this in your page head section and set your appropriate image paths.

<script type="text/javascript">
 
        $(document).ready(function () {
          
            $(".button").hover(function () {
                $(this).attr("src""./app_themes/default/images/submit_btn_hvr.png");
            }, function () {
                $(this).attr("src""./app_themes/default/images/submit_btn.png");
            });
                                   
        });
 
    </script>

Markup:

Make sure that you set your initial ImageURl to the same path as the second argument in the hover method, otherwise you won't have an image on page load
 <asp:ImageButton ID="Imagebutton1" class="button" ImageUrl="~/app_themes/default/images/submit_btn.png"
        runat="server" />

Saturday, September 29, 2012

Handling backspace/delete with AJAX MaskedEditExtender in chrome

      Another one of these annoying behaviours with AJAX controls is with the Masked Edit Extender and Chrome browsers. As designed (according to Microsoft) the AJAX MaskedEditExtender does not handle the backspace or delete key strokes. I have not tested this with all mask types, but one in particular is the date mask type.

      I wanted to add just a touch of control to my birthdate text control. Nothing real fancy just format "99/99/9999" to restrict the user gobbly gook. All works as advertised except that you can't use the backspace key if you make a mistake. I don't know about you all, but that key has been my friend since day one, so not being able to use it got me Goggling.  With some searching I came across this javascript that handles the key presses and enables delete in the MaskedEditExtender.

   
Here's the markup. Just need to add the key handlers to the textbox and put the extenders id as function arguments.



  <asp:TextBox ID="ctl_birthday"  runat="server" 
                    onkeydown='KeyDownHandler("MaskedEditExtender1");' ></asp:TextBox>
                    <AJAX:RoundedCornersExtender TargetControlID="ctl_birthday" ID="RoundedCornersExtender1" 
                    runat="server" Corners="All" Radius="8">
                    </AJAX:RoundedCornersExtender>
                    <AJAX:MaskedEditExtender MaskType="Date" Mask="99/99/9999" ID="MaskedEditExtender1" 
                    TargetControlID="ctl_birthday" runat="server">
                    </AJAX:MaskedEditExtender>


Here is the javascript for the handler:


function KeyUpHandler(sender) { }
 
function KeyDownHandler(maskExtenderId) {
 
    if (navigator.appName != "Microsoft Internet Explorer") {
 
 
 
        if (event.keyCode == 35 || event.keyCode == 36) { // Home and End buttons functionality
 
 
 
            var txtElement = $get(event.srcElement.id);
 
            var txtElementText = GetTextElementValue(event.srcElement.id);
 
 
 
            if (event.keyCode == 36) {//Home button
 
                setCaretPosition(txtElement, 0);
 
            }
 
            if (event.keyCode == 35) {//End button
 
                setCaretPosition(txtElement, txtElementText.length);
 
            }
 
        }
 
 
        if (event.keyCode == 8 || event.keyCode == 46) {
 
 
 
            var txtElement = $get(event.srcElement.id);
 
            var txtElementText = GetTextElementValue(event.srcElement.id);
 
            var txtElementCursorPosition = doGetCaretPosition(txtElement);
 
            var maskExtender = $find(maskExtenderId);
 
 
            var start = txtElement.selectionStart;
 
            var end = txtElement.selectionEnd;
 
            var selectedSymbols = end - start;
 
 
 
            if (event.keyCode == 8) //BackSpace
            {
 
                if (selectedSymbols > 0) {//if there is selection(more then 1 symbol)
 
 
                    var str1 = txtElementText.substr(0, start);
 
                    var str2 = txtElementText.substr(end);
 
                    var str = str1 + str2;
 
                    if (str.length < txtElementText.length) str = appendStrWithChar(str, txtElementText, "_");
 
                    SetTextElementValue(event.srcElement.id, str);
 
                    //txtElement.value = str;
 
                    maskExtender._LogicTextMask = deletePromptChars(str, "_");
 
                    setCaretPosition(txtElement, start);
 
                }
 
                else {
 
                    if ((txtElementCursorPosition - 1) >= 0) {
 
                        var symbol_to_delete = txtElementText[txtElementCursorPosition - 1];
 
                        if (symbol_to_delete == "_") {
 
                            setCaretPosition(txtElement, txtElementCursorPosition - 1);
 
                        }
 
                        else {
 
                            var str1 = txtElementText.substr(0, txtElementCursorPosition - 1);
 
                            var str2 = txtElementText.substr(txtElementCursorPosition);
 
                            var str = str1 + str2;
 
                            if (str.length < txtElementText.length) str = appendStrWithChar(str, txtElementText, "_");
 
                            SetTextElementValue(event.srcElement.id, str);
 
                            //txtElement.value = str;
 
                            maskExtender._LogicTextMask = deletePromptChars(str, "_");
 
                            setCaretPosition(txtElement, txtElementCursorPosition - 1);
 
                            //var real_text = deletePromptChars(str, "_");
 
                        }
 
                    }
 
                }
 
 
 
            }
 
            if (event.keyCode == 46) //Delete
            {
 
                if (txtElementCursorPosition >= 0 && txtElementCursorPosition < txtElementText.length
 
                        && ((selectedSymbols <= 1 && txtElementText[txtElementCursorPosition] != "_") || selectedSymbols > 1)) {
 
 
                    if (selectedSymbols > 1) {//if there is selection(more then 1 symbol)
 
                        var str1 = txtElementText.substr(0, start);
 
                        var str2 = txtElementText.substr(end);
 
                        var str = str1 + str2;
 
                        if (str.length < txtElementText.length) str = appendStrWithChar(str, txtElementText, "_");
 
                        SetTextElementValue(event.srcElement.id, str);
 
                        //txtElement.value = str;
 
                        maskExtender._LogicTextMask = deletePromptChars(str, "_");
 
                        setCaretPosition(txtElement, start);
 
                    }
 
                    else {//no selection or 1 symbol selected
 
                        var symbol_to_delete = txtElementText[txtElementCursorPosition];
 
 
                        if (symbol_to_delete != "_") {
 
                            var str1 = txtElementText.substr(0, txtElementCursorPosition);
 
                            var str2 = txtElementText.substr(txtElementCursorPosition + 1);
 
                            var str = str1 + str2;
 
                            if (str.length < txtElementText.length) str = appendStrWithChar(str, txtElementText, "_");
 
                            SetTextElementValue(event.srcElement.id, str);
 
                            //txtElement.value = str;
 
                            maskExtender._LogicTextMask = deletePromptChars(str, "_");
 
                            setCaretPosition(txtElement, txtElementCursorPosition);
 
                        }
 
                    }
 
                }
 
 
 
            }
 
        }
 
 
    }
 
 
}
 
function GetTextElementValue(elementId) {
 
    var textBox = $get(elementId), text;
 
    if (textBox.AjaxControlToolkitTextBoxWrapper) {
 
        text = textBox.AjaxControlToolkitTextBoxWrapper.get_Value();
 
    }
 
    else {
 
        text = textBox.value;
 
    }
 
 
    return text;
 
}
 
 
function SetTextElementValue(elementId, someText) {
 
    var textBox = $get(elementId);
 
    if (textBox.AjaxControlToolkitTextBoxWrapper) {
 
        textBox.AjaxControlToolkitTextBoxWrapper.set_Value(someText);
 
    }
 
    else {
 
        textBox.value = someText;
 
    }
 
}
 
 
function appendStrWithChar(str, templateStr, appChar) {
 
    var newStr = str;
 
    var difference = templateStr.length - newStr.length;
 
 
    if (difference > 0) {
 
        for (i = 0; i < difference; i++) { newStr = newStr + "_"; }
 
    }
 
    return newStr;
 
}
 
 
function deletePromptChars(str, promptChar) {
 
    var newStr = str;
 
    for (i = 0; i < newStr.length; i++) {
 
        if (str[i] == promptChar) {
 
            newStr = newStr.substr(0, i);
 
            return newStr;
 
        }
 
    }
 
}
 
 
function doGetCaretPosition(ctrl) {
 
    var CaretPos = 0; // IE Support
 
    if (document.selection) {
 
        ctrl.focus();
 
        var Sel = document.selection.createRange();
 
        Sel.moveStart('character', -ctrl.value.length);
 
        CaretPos = Sel.text.length;
 
    }
 
    // Firefox support
 
    else if (ctrl.selectionStart || ctrl.selectionStart == '0')
 
        CaretPos = ctrl.selectionStart;
 
    return (CaretPos);
 
}
 
 
function setCaretPosition(ctrl, pos) {
 
    if (ctrl.setSelectionRange) {
 
        ctrl.focus();
 
        ctrl.setSelectionRange(pos, pos);
 
    }
 
    else if (ctrl.createTextRange) {
 
        var range = ctrl.createTextRange();
 
        range.collapse(true);
 
        range.moveEnd('character', pos);
 
        range.moveStart('character', pos);
 
        range.select();
 
    }
 
}


Happy Coding...

Merlin