Categoria: asp


Ottima raccolta di tutorials su good-tutorials.com divisi per categorie.

Sito web: http://www.good-tutorials.com/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Ottimo sito dove poter trovare interessanti tutorial avanazati su programmazione web.

Sito web: http://nettuts.com/

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

Grafici gratuiti per asp.net

 

Sito web: http://blog.lavablast.com/...r-ASPNET---SubSonic.aspx 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

<%
function RTESafe(strText)
    'returns safe code for preloading in the RTE
    dim tmpString
    tmpString = trim(strText)
    'convert all types of single quotes
    tmpString = replace(tmpString, chr(145), chr(39))
    tmpString = replace(tmpString, chr(146), chr(39))
    tmpString = replace(tmpString, "'", "'")
    'convert all types of double quotes
    tmpString = replace(tmpString, chr(147), chr(34))
    tmpString = replace(tmpString, chr(148), chr(34))
    tmpString = replace(tmpString, """", "\""")
    'replace carriage returns &amp; line feeds
    tmpString = replace(tmpString, chr(10), " ")
    tmpString = replace(tmpString, chr(13), " ")
    RTESafe = tmpString
end function
%>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati
'videoform.asp

<form method="POST" action="getrealurl.asp">

<p>
<input type="text" name="v" size="20" value="http://www.youtube.com/watch?v=ro5Xl4qLl8o">
<input type="submit" value="Submit" name="B1">

</p>
</form>

<%
'getrealurl.asp Updated as of June 29, 2007.

<%
'Script by Lil Peck lilpeck@gmail.com - http://equineexpo.com/aspexamples/youtu/
'You may use this in your applications but please leave acknowlegement for me.
'Finds real URL of YouTube flash video file.

'---check referring form page

Dim strDuh 'declaring the variable, a good habit
strDuh = Request.ServerVariables("HTTP_REFERER")'the string we want to compare to the items in the array
'response.write strDuh

Dim sMyArray(4)'what we name our array and how many items in it
'replace following urls with your form page urls
sMyArray(0) = "http://equineexpo.com/aspexamples/youtu/videoform.asp"
sMyArray(1) = "http://www.equineexpo.com/aspexamples/youtu/videoform.asp"
sMyArray(2) = "http://qhtimes.com/aspexamples/youtu/videoform.asp"
sMyArray(3) = "http://www.qhtimes.com/aspexamples/youtu/videoform.asp"

For Each i In sMyArray 'i can be any designation for the items in the array like z or bugguts or whatever

'now we need to set up a Case with with to compare our querystring to the items in the array
Select Case MatchArray 'give your case a name for identification purposes

Case YES

if i = strDuh then
Cal = "YES"

end if
End select

Next

If Cal = "YES" then response.write""

If NOT Cal = "YES" then

'replace following urls with your form page url
response.redirect "http://equineexpo.com/aspexamples/youtu/videoform.asp"
end if

'---end check referring form page

if request.form("v") = "" then
response.redirect "videoform.asp"
end if
%>

<%
dim strVid
strVid = request.form("v")

dim vidID
vidID = Right(strVid, Len(strVid) - InStrRev(strVid, "=") ) 'gets id number from url

Server.ScriptTimeout = 240

Set HttpObj = Server.CreateObject("AspHTTP.Conn")

HttpObj.Url = "http://www.youtube.com/v/" & vidID

HttpObj.FollowRedirects = true

HttpObj.RequestMethod = "GET"

HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B; Windows NT)"

strResult = HttpObj.GetURL
curURL = HttpObj.Url

%>
<%

InitialString = curURL

Set RegularExpressionObject = New RegExp

With RegularExpressionObject
.Pattern = "http://www.youtube.com/jp.swf"
.IgnoreCase = True
.Global = True
End With

ReplacedString = RegularExpressionObject.Replace(InitialString, "http://www.youtube.com/get_video")

Set RegularExpressionObject = nothing

Set HttpObj = Server.CreateObject("AspHTTP.Conn")

HttpObj.Url = ReplacedString

HttpObj.FollowRedirects = true

HttpObj.RequestMethod = "GET"

HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B; Windows NT)"

strResult = HttpObj.GetURL

nextURL = HttpObj.Url

%>
<%

Set HttpObj = Server.CreateObject("AspHTTP.Conn")

HttpObj.Url = nextURL

HttpObj.FollowRedirects = true

HttpObj.RequestMethod = "GET"

HttpObj.UserAgent = "Mozilla/2.0 (compatible; MSIE 3.0B; Windows NT)"

strResult = HttpObj.GetURL

fnlURL = HttpObj.Url

%>

<%
'regex script from http://authors.aspalliance.com/brettb/VBScriptRegularExpressions.asp
'converts real flv file url from get_video to get_video_abc123.flv so user doesn't have to rename
InitialString = fnlURL

Set RegularExpressionObject = New RegExp

With RegularExpressionObject
.Pattern = "get_video?"
.IgnoreCase = True
.Global = True
End With

MyRep = "get_video_" & vidID & ".flv"

ReplacedString = RegularExpressionObject.Replace(InitialString, MyRep)

Set RegularExpressionObject = nothing

%>

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>asp script video downloader asphttp youtube</title>

</head>

<body style="font-family: Verdana">
<b><font size="4">ASP script to save/download YouTube videos (v. 4)</font></b><p>
<b>
<br><a href="<%
response.write ReplacedString %>">Click to download video file.</a><br>

<a href="savetosite.asp?vid=<%=vid%>&file=<% response.write ReplacedString %>">Click to save to server.</a><br>
<p>

savetosite.asp - OPTIONAL, allows the files to be saved directly to your website

<%@ Language=VBScript %>
<%

'change folders and urls to your own
'if you use this option you may want to put in safeguards (referer check and so on) to prevent abuse and
'also change the variable strURL to be inputted by form rather than querystring
' Set the URL of the file you want to save
strURL = request.querystring("file")
strFileExtension = ".flv"
' Set the Local path on your server
strLocalPath = "D:\Clients\public_html\aspexamples\youtu\"
strLocalFileName = request.querystring("vid")

' Create Work Object
Set objXMLHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
Set objBinaryStream = CreateObject("ADODB.Stream")

' Get the file
objXMLHTTP.Open "GET", strURL & strFileName & strFileExtension , false
objXMLHTTP.Send()
objBinaryStream.Type = 1

objBinaryStream.Open
objBinaryStream.Write objXMLHTTP.responseBody
' Save the file on the server
objBinaryStream.SaveToFile server.MapPath("./" & strLocalFileName & strFileExtension), 2

Set objXMLHTTP = Nothing
Set objBinaryStream = Nothing
response.write "Complete. <BR>http://equineexpo.com/aspexamples/youtu/" & strLocalFileName & strFileExtension &"<br>"
Response.Write("<a href=""download.asp?FileName=http://equineexpo.com/aspexamples/youtu/" & http://equineexpo.com/aspexamples/youtu/" & strLocalFileName & strFileExtension & ">" & vbNewline & _
"Download</a>" & vbNewline )

Response.write(vbNewLine)

%> 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati
02
07

Mostrare un feed rss usando asp

posted di Administrator, in asp, tutorials. No Commenti

Questo tutorial spiega come aggiungere contenuti dinamici da un feed 2.0. RSS è un formato XML per mostrare nuovi contenuti, update di siti web eblogs.

Il formato RSS 2.0
RSS 2.0 è semplicemente un file xml.In un fedd RSS,<item> viene ripetuto per ciascuna news. Il seguente è un esempio di feed rss. vedi Resources per le specifiche complete.

<rss version="2.0">
     <channel>
          <title>channel title</title>
          <link>link to channel</link>
          <description>description</description>
          <language>en-us</language> 
          <item>
               <title>item title</title>
               <link>link url</link>
               <guid>unique id</guid>
               <description>item description</description>
          </item>
     </channel>
</rss>

Leggi l'articolo completo: http://www.codebeach.com/tutorials/displaying-rss-feeds-using-asp.asp

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati
02
02

Mostrare feed rss usando asp

posted di Administrator, in asp, tutorials. No Commenti

In questo articolo vedremo come mostrare i nostri feed rss leggendo i dati dal db. Un feed rss è un file xml che ha dei tag particolari. Un feed rss è un qualcosa del tipo:

Un nuovo file rss deve iniziare con

<rss version=”0.92″>

che specifica la versione del file rss in uso. Tutte le informazioni che metteremo nel nostro file rss devono essere
racchiuse tra i tag :

<channel>

</channel>

Poi dobbiamo mettere un blocco di tag che identificano la provenienza delle informazioni

- <title></title> indica il titolo del documento rss
- <description></description> indica la descrizione
- <link></link> indica il sito di provenienza
- <language></language> indica la lingua
- <copyright></copyright> indica il copyright
- <managingEditor></managingEditor> indica il responsabile delle informazioni

e poi mettere le singole informazioni/notizie tra i tag. Infatti ogni nuova notizia deve iniziare tra i tag

<item>

</item>

Per maggiori info, potete leggere http://www.sastgroup.com/tutorials/cosa-e-un-feed-rss.

Per leggere un feed rss è necessario istanziare un oggetto del tipo MSXML2.DOMDocument . questo oggetto ti permette di accedere a questi file XML tramite DOM (Document Object Model). Ad esempio per leggere un file RSS feed con l'oggetto XML DOM:

Set xmlDOM = Server.CreateObject("MSXML2.DOMDocument")
xmlDOM.async = False
xmlDOM.setProperty "ServerHTTPRequest", True
xmlDOM.Load("file_export.asp")

Fatto ciò realizziamo il nostro file asp

'prende tutti gli <item> tags nel feed
Set itemList = xmlDOM.getElementsByTagName("item")
strHTML = strHTML & "<ul>"
'esegui una iteraione
For Each item In itemList
  'Parsa i figli
  For each child in item.childNodes
    Select case lcase(child.nodeName)
        case "title"
          title = child.text
        case "link"
          link = child.text
        case "description"
          description = child.text
    End Select
  Next
  'costruisci l'output xml
  strHTML = strHTML & "<li>"
  strHTML = strHTML & "<a href='" & Server.HTMLEncode(link) & "'>"
  strHTML = strHTML & Server.HTMLEncode(title)  strHTML = strHTML & "</a>"
  strHTML = strHTML & "<br>"
  strHTML = strHTML & description
  strHTML = strHTML & "<br>&nbsp;"
  strHTML = strHTML & "</li>"
Next
strHTML = strHTML & "</ul>"
Set xmlDOM = Nothing
Set itemList = Nothing
Response.Write(strHTML)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati

<%
If Response.IsClientConnected=true then
Response.Write(”Utente connesso!”)
else
Response.Write(”Utente non connesso”)
end if
%>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati
02
02

Creare un file excel con asp

posted di Administrator, in asp, tutorials. No Commenti

Per creare un file excel con asp è necessario settare l'header corretto e in poche parole stampare a video una tabella

<%
Response.AddHeader "Content-Disposition", "attachment;filename=doc.xls"
Response.ContentType = "application/vnd.ms-excel"
response.write "<table width="100%" border="1" >"
response.write "<tr>"
response.write "<th width=""40%""><b>Nome</b></th>"
response.write "<th width=""30%""><b>Cognome</b></th>"
response.write "<th width=""30%""><b>Eta</b></th>"
response.write "</tr>"
response.write "<tr>"
response.write "<td width=""40%"">tizio</td>"
response.write "<td width=""30%"">caio</td>"
response.write "<td width=""30%"">23</td>"
response.write "</tr>"
response.write "</table>"
%>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us
  • digg
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • Ma.gnolia
  • NewsVine
  • Reddit
  • scuttle
  • Smarking
  • Spurl
  • YahooMyWeb
  • DZone
  • Internetmedia
  • Snap2r
  • Technorati
31
01

Creare un file word con asp

posted di Administrator, in asp, tutorials. No Commenti

<%
    Response.ContentType = "application/msword"
    Response.AddHeader "Content-Disposition", "attachment;filename=nomefile.doc"   
    response.Write("ciao a tutti che bello questo tutorial lo puoi vedere da <a href="http://www.sastgroup.com">sastgroup.com</a> " & vbnewline)
    response.Write("<b>Posso usare codice html</b>")
    response.Write ("<div style=""padding:6px; font:12px verdana"">e codice css</span>")
%>

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blinkbits
  • BlinkList
  • blogmarks
  • co.mments
  • del.icio.us
  • De.lirio.us