Dave's Notebook

Prevent Postback on Buttons

IMG_1380 Over the weekend I got a question about how to prevent postbacks on buttons from within jQuery tabs. But the question really isn’t specific to jQuery. There are other times when you might not want a button to post back. So how do you do this? There are several ways you might accomplish this depending on what your goal is. The first, and most obvious choice, is to not use an ASP:Button control and use an HTML input type=”button” tag instead. This will allow you to have full control over what is happening on the client side. If at all possible, this should be your first choice.

Read More

jQuery, Each() and Async Gets

H04K0067

One of the things to keep in mind when using jQuery is that nothing is a blocking call. Sure, there is a certain sequence to when things operate. But, to be safe, you should always assume that step two will happen during step one.

Nowhere is this more evident than when retrieving content from a URL and inserting that content in your page.

The temptation is to write code that looks something like this:

Read More

Forms Authentication – Manual Authentication

F03I0043

I’ve had several occasions in the past where I’ve needed to do my own authentication or I’ve needed to add some additional methods to the authentication process.

As easy as Microsoft has made the authentication process, you might think that in order to manually authenticate you’d need to write all of your authentication code manually. But nothing could be farther from the truth.

Read More