How to make JQuery work with ASP.NET Web Content Form?

by Rohit 6. May 2011 16:50

In an ASP.NET application, making JQuery work with a Master Page and Web Content Form is often a matter of confusion for beginners. Since the Web Content Form doesn't have a HTML HEAD section, novice programmers often get baffled on where to put references to JQuery necessary files and CSS files.

Below I show you how simply you can make JQuery work in an application with a Master Page and a Web Content Form. To make this example work, you need to download few files and add their references to your Visual Studio project. This example uses Visual Studio 2008 with .NET Framework 3.5 SP1.

JQuery core file needed

jquery-1.5.1.min.js

You can download this file from JQueryUI website.

JQuery DatePicker plugin

I am taking a JQuery DatePicker plugin from Keith Wood's blog.

A DatePicker can easily be added as a popup to a text field or inline in a division or span with appropriate default settings. The popup shows when the field gains focus and is closed by clicking on the Close link or clicking anywhere else on the page. You can also remove the DatePicker widget if it is no longer required.

We need two files of this plugin to display a simple DatePicker:

jquery.datepick.js, and
jquery.datepick.css

To start with:

  • Create a simple ASP.NET website using Visual Studio. As I said before, I am using Visual Studio 2008 for this example. (You can try this example with the latest version as well, but I have not tested this example on the latest version.)
  • Add a Master Page [In this example it is named: Master1.master]
  • Add a Web Content Form. Don't forget to link it up with the Master Page, Master1.master, we added above.

This is how the Solution Explorer on my desktop looks like:

More...

Was RSA or RC4 broken to decipher Conficker?

by Rohit 14. January 2011 05:22

Initially, when I read about the use of symmetric and asymmetric cryptography in Conficker worm, I didn’t realize the real risk. I already knew that modern malware use some type of encryption to prevent detection, but the use of algorithms like RSA and RC4 puzzled me. Not only that, the use of long 4096-bit keys made me even more uneasy.

How could a malware use such a sophisticated method for replication? I am not an authority in this area, but with whatever little I know, malware use techniques to shorten their code so that the malicious content could be easily injected into another file. Long code means sooner detection. Even if Conficker uses RSA for safe transmission, how it managed key-handling? Who possessed the secret key and how he remotely decrypts the malware code on a remote machine? Were the good guys able to decrypt the code? RSA 2048 & 4096-bit key is considered reasonably safe and if the good guys could decipher the code, does it mean there is a backdoor in the algorithm itself?

I was more concerned about the last question until Paul Duckin, of SOPHOS labs, answered my query. Below is the extract of his answer:

 More...

Tags: , , , , , ,

Blog | Security

About Rohit

I have a tremendous passion for software. My day job at a Fortune 100 company exposes me to all sorts of .NET and SQL Server tasks, but my passion drives me to explore other technologies as well. I recently fall in love with Ruby on Rails and in my spare time trying to explore it. Previously I have worked on PHP as well.

I am one of the technical reviewer of Aptana Studio Beginner's Guide which recently got published through Packt Publishing.

My personal blog is with the name My Days Uncovered
 
You can either use Contact Form or mail me directly at:
 
rohit [at] irohitable [dot] com

Month List