.NET2011/11/30 18:34

MailMessage mail = new MailMessage();
mail.To.Add(
"보내는사람주소");

mail.From
= new MailAddress("Gmail아이디@gmail.com");
mail.Subject
= "아뵹~ 이건 멜 테스트야~";

string Body = "메일 테스트라고 했지?<br />그런거야?";
mail.Body
= Body;

mail.IsBodyHtml
= true;
SmtpClient smtp
= new SmtpClient();
smtp.Host
= "smtp.gmail.com";
smtp.Credentials
= new System.Net.NetworkCredential("Gmail아이디@gmail.com", "Gmail암호");

smtp.EnableSsl
= true;
smtp.Send(mail);

저작자 표시
Posted by
.NET2011/07/28 16:09
* 출처 : http://forums.asp.net/t/1254125.aspx
저작자 표시
Posted by
ASP2011/07/12 13:28

CommandTypeEnum Values

ConstantValueDescription
adCmdUnspecified -1 Does not specify the command type argument.
adCmdText 1 Evaluates CommandText as a textual definition of a command or stored procedure call.
adCmdTable 2 Evaluates CommandText as a table name whose columns are all returned by an internally generated SQL query.
adCmdStoredProc 4 Evaluates CommandText as a stored procedure name.
adCmdUnknown 8 Default. Indicates that the type of command in the CommandText property is not known.
adCmdFile 256 Evaluates CommandText as the file name of a persistently stored Recordset. Used with Recordset.Open or Requery only.
adCmdTableDirect 512 Evaluates CommandText as a table name whose columns are all returned. Used with Recordset.Open or Requery only. To use the Seek method, the Recordset must be opened with adCmdTableDirect. This value cannot be combined with the ExecuteOptionEnum value adAsyncExecute.


출처 : 
http://www.w3schools.com/ado/prop_comm_commandtype.asp
저작자 표시
Posted by
SQL Server 20082011/06/21 14:30
SELECT O.name
FROM   sysobjects O JOIN syscomments C
ON     O.id = C.id
WHERE  O.type = 'P' AND C.text LIKE '%문자열%'
저작자 표시
Posted by
ASP2011/06/14 16:33

The table below shows the ADO Data Type mapping between Access, SQL Server, and Oracle:

DataType EnumValueAccessSQLServerOracle
adBigInt 20   BigInt (SQL Server 2000 +)  
adBinary 128   Binary
TimeStamp
Raw *
adBoolean 11 YesNo Bit  
adChar 129   Char Char
adCurrency 6 Currency Money
SmallMoney
 
adDate 7 Date DateTime  
adDBTimeStamp 135 DateTime (Access 97 (ODBC)) DateTime
SmallDateTime
Date
adDecimal 14     Decimal *
adDouble 5 Double Float Float
adGUID 72 ReplicationID (Access 97 (OLEDB)), (Access 2000 (OLEDB)) UniqueIdentifier (SQL Server 7.0 +)  
adIDispatch 9      
adInteger 3 AutoNumber
Integer
Long
Identity (SQL Server 6.5)
Int
 
Int *
adLongVarBinary 205 OLEObject Image Long Raw *
Blob (Oracle 8.1.x)
adLongVarChar 201 Memo (Access 97)
Hyperlink (Access 97)
Text Long *
Clob (Oracle 8.1.x)
adLongVarWChar 203 Memo (Access 2000 (OLEDB))
Hyperlink (Access 2000 (OLEDB))
NText (SQL Server 7.0 +) NClob (Oracle 8.1.x)
adNumeric 131 Decimal (Access 2000 (OLEDB)) Decimal
Numeric
Decimal
Integer
Number
SmallInt
adSingle 4 Single Real  
adSmallInt 2 Integer SmallInt  
adUnsignedTinyInt 17 Byte TinyInt  
adVarBinary 204 ReplicationID (Access 97) VarBinary  
adVarChar 200 Text (Access 97) VarChar VarChar
adVariant 12   Sql_Variant (SQL Server 2000 +) VarChar2
adVarWChar 202 Text (Access 2000 (OLEDB)) NVarChar (SQL Server 7.0 +) NVarChar2
adWChar 130   NChar (SQL Server 7.0 +)  


출처 : 
http://www.w3schools.com/ADO/ado_datatypes.asp
저작자 표시
Posted by
jQuery2010/11/26 19:04
http://www.comptechdoc.org/independent/web/cgi/javamanual/javastyle.html

JavaScript로 CSS를 제어할때 CSS형식과 조금 틀려서 찾아보니 규칙이 있긴 있었구나~

저작자 표시
Posted by
ASP2010/11/10 13:58

* 발신자 Email 주소는 변경할수 없슴, 변경하면 발송안됨, 이 글을 쓴 상태에선 그렇습니다.
* 구글어플리케이션을 이용하여 도메인 연결하시고 쓰시면 도메인 이메일 주소로도 가능합니다~ ^^;

    Function GoogleSendMail(strTo, strSubject, strBody)
        On Error Resume Next
    
        Set iMsg = CreateObject("CDO.Message")
        Set iConf = CreateObject("CDO.Configuration")
        Set Flds = iConf.Fields

        schema = "http://schemas.microsoft.com/cdo/configuration/"

        Flds.Item(schema & "sendusing") = 2
        Flds.Item(schema & "smtpaccountname") = "웃는남자@gmail.com"
        Flds.Item(schema & "sendemailaddress") = "웃는남자@gmail.com"
        Flds.Item(schema & "smtpuserreplyemailaddress") = "웃는남자@gmail.com"
        Flds.Item(schema & "smtpserver") = "smtp.gmail.com" 
        Flds.Item(schema & "smtpserverport") = 465
        Flds.Item(schema & "smtpauthenticate") = 1
        Flds.Item(schema & "sendusername") = "웃는남자@gmail.com"
        Flds.Item(schema & "sendpassword") = "계정암호"
        Flds.Item(schema & "smtpusessl") = 1
        Flds.Update

        Set Flds = Nothing

        Set iMsg =  Server.CreateObject("CDO.Message")
    
        With iMsg
          .Configuration = iConf
          .To       = strTo
          .Subject  = strSubject
          .HTMLBody = strBody
          SendEmailGmail = .Send
        End With
    
        set iMsg = nothing
        set iConf = nothing
        set Flds = nothing
        If Err.number <> 0 Then
          GoogleSendMail = Err.Description
        Else
          GoogleSendMail = 0
        End If
    End Function


    Ret = GoogleSendMail("abc@abc.com", Now , "내용이얌")  

저작자 표시
Posted by
TAG SMTP, 구글
jQuery2010/11/08 15:01

jQuery rotator

데모화면
http://jquery-cookbook.com/examples/12/12.7-cross-fading-rotating-images/index.html
저작자 표시
Posted by
jQuery2010/11/01 16:44

셀렉트박스(Select Box)와 슬라이더바(Slider Bar)의 결합

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="/jquery-ui-1.8.5.custom/css/ui-lightness/jquery-ui-1.8.5.custom.css" rel="stylesheet" type="text/css"  />
</head>
<body>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script src="/jquery-ui-1.8.5.custom/js/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var select = $("#minbeds");
            var Dummy = $("#Dummy");
            var slider = $('<div id="slider" style="width:200px;"></div>').insertAfter(Dummy).slider({
                min: 1,
                max: 6,
                range: "min",
                value: select[0].selectedIndex + 1,
                slide: function (event, ui) {
                    select[0].selectedIndex = ui.value - 1;
                }
            });

            $("#minbeds").click(function () {
                slider.slider("value", this.selectedIndex + 1);
            });
        });
    </script>
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                <select name="minbeds" id="minbeds">
                    <option>1</option>
                    <option>2</option>
                    <option>3</option>
                    <option>4</option>
                    <option>5</option>
                    <option>6</option>
                </select>
            </td>
            <td style="padding-left:12px;">
                <span id="Dummy"></span>
            </td>
        </tr>
    </table>
</body> 
</html>
저작자 표시
Posted by
jQuery2010/11/01 15:42


jQuery UI를 이용하여 슬라이드바(slider bar) 구현
첨부파일을 받거나 다음위치에서 다운로드 http://jqueryui.com/download

테마(Theme)는 UI lightness를 사용




    <link href="/jquery-ui-1.8.5.custom/css/ui-lightness/jquery-ui-1.8.5.custom.css" rel="stylesheet" type="text/css"  />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script src="/jquery-ui-1.8.5.custom/js/jquery-ui-1.8.5.custom.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var slider = $("#slider-range").slider({
                range: true,
                min: 0,
                max: 500,
                values: [1, 300],
                slide: function (event, ui) {
                    $("#amount").val('$' + ui.values[0] + ' - $' + ui.values[1]);
                }
            });
            $("#amount").val('$' + slider.slider("values", 0) + ' - $' + slider.slider("values", 1));
        });
    </script>
    <p>
        <label for="amount">Price range:</label>
        <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
    </p>
    <div id="slider-range"></div>
저작자 표시
Posted by