Category: Web programming

Uploading an image to database in C#

Posted by Ruben Canton on February 28, 2012 at 12:31 pm
categories Web programming

1. Placing the FileUpload object
First, we need to set the FileUpload object, we will use the one .Net gives us:

<asp:FileUpload ID="myFile" runat="server" />

That was easy
2. Getting the file from the FileUpload object
2.1 Checking the uploaded file is an image
Before going on, I want to show you this useful function [...]

 

Validate forms in client side using jQuery

Posted by Ruben Canton on February 24, 2012 at 9:00 am
categories Web programming, Web security

There is a quick way for validating forms if you are using jQuery.
1. Download the validation plugin
You need to download the jQuery Validate plugin. Alternatively you can make a call to the online version from your code.
2. Add the plugin to your website
I presume you are yet using the latest jQuery library and you don’t [...]

 

Building your Authentication system in .Net4.0

Posted by Ruben Canton on February 20, 2012 at 10:30 am
categories Web programming, Web security

By default, .Net applications offer a prebuilt authentication system that you can use to give some privacy to your website in case its a small one. But, in case you pretend to use your existing DB with its existing users table and your existing conditions you may want to build your own authentication system.
Most of [...]

 

How to get a string in MD5 in C#.Net

Posted by Ruben Canton on February 17, 2012 at 9:22 am
categories Web programming, Web security

Here it is:

public static String getInMD5(String inputString) {
byte[] input = Encoding.UTF8.GetBytes(inputString);
byte[] output = MD5.Create().ComputeHash(input);
[...]

 

How to fix error “Changes are not allowed while code is running” in .Net

Posted by Ruben Canton on February 16, 2012 at 12:27 pm
categories Web programming

If you have tried to modify your back code in .Net when your application is running and found this annoying message:

Forcing you to stop debugging, edit, start debugging again. Then here’s a solution:
1. Stop running your app.
2. Go to Tools > Options > Debugging > Edit and Continue
3. Disable “Enable Edit and Continue”.
If you find [...]

WordPress Themes