1 / 15

Internet Information Server

Internet Information Server. Active Server Pages. InterDev (Visual Studio). VB + HTML. <HTML> <BODY> To jest przykład <% dim termin termin = "01-06-2002" if date >= termin then Response.Write "Termin upłynął!!!" else Response.Write "<A HREF=""abc.asp"">Dalej</A>" end if %>

takara
Télécharger la présentation

Internet Information Server

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Internet Information Server Active Server Pages InterDev (Visual Studio)

  2. VB + HTML <HTML> <BODY> To jest przykład <% dim termin termin = "01-06-2002" if date >= termin then Response.Write "Termin upłynął!!!" else Response.Write "<A HREF=""abc.asp"">Dalej</A>" end if %> </BODY> </HTML>

  3. Inny sposób (bez Response.Write) <HTML><BODY> To jest przykład <% dim termin termin = "01-06-2002" if date >= termin then %> Termin upłynął!!! <% else %> <A HREF="abc.asp">Dalej</A> <% end if %> </BODY></HTML>

  4. ADODB.Recordset Set rs = CreateObject("ADODB.Recordset") rs.Open "SELECT Imie, Nazwisko FROM Pracownik", "uid=uzytkownik;pwd=qwe123;driver={SQL Server};server=abc;database=xyz” dim StrTable StrTable = "<TABLE>" While Not rs.EOF StrTable = StrTable & "<TR>" For i = 0 To 2 StrTable = StrTable & "<TD>" & rs.Fields(i) & "</TD>" Next i rs.MoveNext StrTable = StrTable & "</TR>" Wend StrTable = StrTable & "</TABLE>" Set rs = Nothing

  5. ADODB.Command Set Con = CreateObject("ADODB.Command") Con.ActiveConnection = "uid=uzytkownik;pwd=qwe123;driver={SQL Server};server=abc;database=xyz" Con.CommandText = "DELETE FROM Pracownik" Con.Execute

  6. Formularze HTML <FORM name=f action=abc.asp method=post> [...] </FORM>

  7. INPUT <INPUT type=text name=field1 size=55 maxlength=20 value="Wartosc domyslna"> <INPUT type=checkbox name=field2> <INPUT type=radio name=field3 VALUE=1 CHECKED>Opcja 1 <INPUT type=radio name=field3 VALUE=2>Opcja 2 <INPUT type=radio name=field3 VALUE=3>Opcja 3

  8. TEXTAREA i SELECT <TEXTAREA name=field4 rows=10 cols=65> Blabla </TEXTAREA> <SELECT name=field5> "<OPTION VALUE=0>Nie mam zdania</OPTION> "<OPTION VALUE=1>1</OPTION>" "<OPTION VALUE=2>2</OPTION>" </SELECT>

  9. SUBMIT i RESET <INPUT TYPE="SUBMIT” VALUE="Zapisz"> <INPUT TYPE="RESET” VALUE="Wyczysc">

  10. Metoda GET <FORM name=f action=abc.asp method=get>

  11. Metoda POST <FORM name=f action=abc.asp method=post>

  12. Odbieranie danych W metodzie POST: Request.Form(„nazwa pola”) W metodzie GET: Request.QueryString(„nazwa pola”)

  13. Zmienne sesji Session(„nazwa_zmiennej”) = wartość

  14. Przykład Dim Imie, Nazwisko Imie = Request.Form(„Imie”) Nazwisko = Request.Form(„Nazwisko”) Set Con = CreateObject("ADODB.Command") Con.ActiveConnection = "uid=uzytk;pwd=qwe123;driver={SQL Server};server=abc;database=xyz" Con.CommandText = ”INSERT INTO Osoba (Imie, Nazwisko, WprowadzilID VALUES (‘” & imie & „’,’„ & nazwisko & „’,” & Session(„id”) & „)” Con.Execute

  15. Zabezpieczenie IIS • Service Pack • IIS LockDown • URLScan

More Related