Generating client side certificates in browser and signing on server

Yes, it’s possible. There are no cross-browser solutions, though. For Internet Explorer, you will have to use some ActiveX controls using X509Enrollment.CX509EnrollmentWebClassFactory or CEnroll.CEnroll, depending on whether it’s running on Windows XP or Vista/7. This will generate a PKCS#10 certificate request (which you may need to wrap between the traditional delimiters. For the rest, you … Read more

Client-side Javascript app – url routing with no hash tag

In Ember.js (version 1.0.0rc3) this can be accomplished by using the Ember.js location API: App.Router.reopen({ location: ‘history’ }); And then setting the web server to redirect traffic to the Ember application. To give a concrete example here is a basic Apache .htaccess file redirecting traffic to the Ember application located in index.html: RewriteEngine on RewriteCond … Read more

Reading line-by-line file in JavaScript on client side

Eventually I’ve created new line-by-line reader, which is totally different from previous one. Features are: Index-based access to File (sequential and random) Optimized for repeat random reading (milestones with byte offset saved for lines already navigated in past), so after you’ve read all file once, accessing line 43422145 will be almost as fast as accessing … Read more

Disable client-side validation in MVC 3 “cancel” submit button

What is this mystical force that causes the answer to reveal itself as soon as you post a question somewhere? It looks like in MVC 3 you disable client-side validation on a button by adding the class “cancel” to it. So in my example: <input type=”submit” name=”backButton” value=”← Back” title=”Go back to step 1.” class=”cancel” … Read more

How to store persistent data client side

You can use the Web Storage API (Window.localStorage or Window.sessionStorage). Check out this article on html5doctor for a more in-depth explanation. The Web Storage API is supported by all modern browsers at this point. The read-only localStorage property allows you to access a Storage object for the Document’s origin; the stored data is saved across … Read more

Is there any drawback to set ClientIDMode = Static on every object ( set on maincontent of master page)

You want to be careful about setting the ClientIDMode to Static for things like user controls, or you could end up with multiple elements with the same ID. For data-bound controls like GridView, you’ll also want to use the ClientIDRowSuffix property in order to ensure each row is differentiated. This post has some good examples.