Friday, October 29, 2010

String connection for Microsoft ODBC for Oracle

Direct connection, no DSN, no TSN:

Driver={Microsoft ODBC for Oracle};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=199.199.199.199)(PORT=1523))(CONNECT_DATA=(SID=dbName)));Uid=sqv;Pwd=sqv;

 

Extract from: http://www.connectionstrings.com/oracle#p17 (very good website)

 

Monday, October 25, 2010

Bulleted lists, numeric lists, etc - HTML Tutorial

I found a very good interesting website teaching how to create lists using only html.
I know, it's simple, but I've never used. Since the number of ASP.NET MVC applications are growing, is always good to know...

I used bulleted lists. You can use the following tag: <ul><li></li></ul>. For the other types, check the website, there is a very good a simple tutorial...

http://www.echoecho.com/htmllists.htm

Friday, October 22, 2010

SQL Injection

This video is really good.
I've known about SQL Injection but I've never seen how they do it. The instructor give good tips to avoid it!

http://www.asp.net/security/videos/sql-injection-defense

This is a real example of what could happen:

http://www.itworldcanada.com/news/hacker-steals-e-mail-addresses-demands-astley-tune/140705

Tuesday, October 5, 2010

How to avoid ctrl+c or ctrl+v on a field (javascript)

I've found this code somewhere (I don't remember the website and I
lost the address), and it's very simple and useful:

You can create this function in javascript:

<script language="javascript" type="text/javascript>
function onKeyDown() {
var pressedKey = String.fromCharCode(event.keyCode).toLowerCase()
if (event.ctrlKey && (pressedKey == 'c' || pressedKey == 'v')) {
event.returnValue = false;
}
}
</script>

text tag in a asp.net page
<asp:TextBox ID="txtText" runat="server" Width="80px" MaxLength="10"
onKeyDown="onKeyDown()" ></asp:TextBox>