Geeks With Blogs
HanSolo code monkey
In the project that I am working on, we have many forms that are loaded asynchronously via ajax. Some of these forms contain embedded javacript within the html. Sometimes it can be difficult to debug these scripts. One useful tip that I’ve learned is that you can add “debugger;” to the script where you want the browser to break. You are essentially ......

Was troubleshooting issues today where our open and close quotes weren’t showing up correctly and found that it was because we were using the wrong character codes. We were using “ but should have used “ Something to keep in mind for future reference. http://www.dwheeler.com/ess... ......

I had some trouble today with some anchor elements showing through modal dialogs where they shouldn’t have. The anchor elements had a higher z-index than the modal dialog, which was the cause of the issue that I was seeing. However, I can’t change the z-index on the anchor elements or the modal dialog. So I was pretty much clueless as to what my alternatives ......

I have been working with CKEditor recently and ran into an issue where I noticed some strange random behavior with regards to validation. I noticed that sometimes the validation would pass or fail unexpectedly. It turns out that it was due to the fact that the CKEditor instance creates a separate element for user input and hides the original text area ......

If you've ever worked with XSLT, you'd know that it's pretty limited when it comes to its programming capabilities. Try writing a for loop in XSLT and you'd know what I mean. XSLT is not designed to be a programming language so you should never put too much programming logic in your XSLT. That code can be a pain to write and maintain and so it should ......

Here is a code snippet for writing to a file asynchronously: private void writeFileAsync(string text) { System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding(); byte[] buffer = encoding.GetBytes(text); using (FileStream fs = new FileStream("temp.txt", FileMode.Append, FileAccess.Write, FileShare.ReadWrite, buffer.Length, FileOptions.Asynchronous)) ......

It's a shame that the DataGridViewTextBoxColumn class doesn't allow you to set the casing so that you can restrict user input to all upper or lower case letters. Fortunately, it's actually pretty easy to create a custom column class to do just that. public class DataGridViewUpperCaseTextBo... : DataGridViewTextBoxColumn { public DataGridViewUpperCaseTextBo... ......

The PictureBox control in .NET does not have scroll bars, however, it is actually really easy to create a PictureBox control with scroll bars enabled. All you have to do is to drop a panel control onto a form, and set the AutoScroll property to true. this.panel1.AutoScroll = true; And drop a PictureBox control inside the panel and set the SizeMode to ......

Here is a quick and easy way of starting a background process using the Threadpool by way of an inline delegate. ThreadPool.QueueUserWorkIte... WaitCallback( delegate(object stateInfo) { saveToDB(); })); ......

Copyright © HanSolo | Powered by: GeeksWithBlogs.net