Giriş
.
Üye Ol
.
Yardım
Blograzzi API
- ASP.Net Kod Örnekleri
Blograzzi, bu kod örneğinin kullanımından doğacak herhangi bir sonuçla ilgili olarak sorumluluk kabul etmemektedir.
Gönderen
Sabri DEMİREL (
demirelce
),
www.demirelce.com/tr
Kod Örnekleri
Blog Detayları
Default.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> <!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 runat="server"> <title>Blograzzi Blog Bilgileri</title> </head> <body> <form id="apiFormMain" runat="server"> <!--URL Al Başladı--> <asp:Panel ID="pUrlAl" runat="server" Width="100%"> <span style="font-family: Trebuchet MS"><strong>Blog Url : </strong> <asp:TextBox ID="txtUrl" runat="server" Width="239px" ForeColor="#400000">demirelce.com/tr</asp:TextBox> <asp:Button ID="btnGoster" runat="server" Text="Bilgileri Göster" Font-Bold="True" /><br /><br /> <asp:Label ID="lblHata" runat="server" Font-Size="Small" ForeColor="Red"></asp:Label> </span> </asp:Panel> <!--URL Al Bitti--> <!--Blog Bilgileri Başladı--> <asp:Panel ID="pAlan" runat="server" Visible="false" Width="100%"> <span style="font-family: Trebuchet MS"> <strong>Blog Bilgileri</strong><br /> <asp:Image ID="kullaniciResim" runat="server" Height="70px" Width="70px" /><br /> <span style="color: #330033; text-decoration: underline"><strong>Kullanıcı Adı:</strong></span> <asp:Label ID="lblKullaniciAdi" runat="server"></asp:Label><br /> <span style="color: #330033; text-decoration: underline"><strong>Blog Adı:</strong></span> <asp:Label ID="lblBlogAdi" runat="server"></asp:Label><br /> <span style="color: #330033; text-decoration: underline"><strong>Blog Adresi:</strong></span> <asp:Label ID="lblBlogUrl" runat="server"></asp:Label><br /> <span style="color: #330033; text-decoration: underline"><strong>Açıklaması:</strong></span> <asp:Label ID="lblBlogHakkinda" runat="server"></asp:Label><br /> <span style="color: #330033; text-decoration: underline"><strong>Kategorisi:</strong></span> <asp:Label ID="lblKategori" runat="server"></asp:Label><br /> <span style="color: #330033; text-decoration: underline"><strong>Kategori Sırası:</strong></span> <asp:Label ID="lblKategoriSira" runat="server"></asp:Label><br /> <span style="color: #330033; text-decoration: underline"><strong>Blograzzi Puanı:</strong></span> <asp:Label ID="lblPuan" runat="server"></asp:Label><br /> <span style="color: #330033; text-decoration: underline"><strong>Etiketler:</strong></span> <asp:Label ID="lblEtiket" runat="server"></asp:Label><br /><br /> <asp:Button ID="btnTekrar" runat="server" Text="Tekrar" Font-Bold="True" /> </span> </asp:Panel> <!--Blog Bilgileri Bitti--> </form> </body> </html>
Default.aspx.vb
' Projemizde "Add Web Reference" Bölümüne Girip, ' http://webservice.blograzzi.com/BlograzziWS.asmx ' Adresini Referans Ediyoruz. Imports com.blograzzi.webservice ' Web Referansı Olarak Eklediğimiz Servisi Projemize Dahil Ettik Partial Class _Default Inherits System.Web.UI.Page Dim anahtar As String = "ApiKey Buraya" ' Blograzzi Uygulama Geliştirme Anahtarınız Dim blgServis As New BlograzziWS ' Blograzzi Web Servisi Nesnemizi Oluşturduk Dim blgBilgi As New BlogBilgileri ' Blograzzi Web Servisi BlogBilgileri Nesnemizi Oluşturduk Protected Sub btnGoster_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGoster.Click Dim webadres As String = txtUrl.Text ' Blograzzi Kayıtlı Blog Adresiniz blgBilgi = blgServis.BlogDetaylari(webadres, anahtar) ' Kullanmak İstediğimize Bağlantı Kurduk If Not blgBilgi.Url = Nothing Then kullaniciResim.ImageUrl = blgBilgi.SahipFotoLink.ToString() ' Kullanıcı Fotoğraf Adresini İstedik kullaniciResim.AlternateText = blgBilgi.Sahibi.ToString() ' Fotoğrafımızın Alternatif Yazısını Blograzzi Kullanıcı Adı Yaptık lblKullaniciAdi.Text = blgBilgi.Sahibi.ToString() ' Kullanıcı Adını Aldık lblBlogAdi.Text = blgBilgi.Ad.ToString() ' Blog Adı lblBlogUrl.Text = blgBilgi.Url.ToString() ' Blog Adresi http://xxx lblBlogHakkinda.Text = blgBilgi.Ozet.ToString() ' Blog Hakkında Bölümü lblKategori.Text = blgBilgi.Kategori ' Blog Kategorisi lblKategoriSira.Text = blgBilgi.KategoriSirasi.ToString() ' Blog Kategori Sırası lblPuan.Text = blgBilgi.BlograzziPuanı.ToString() ' Blograzzi Puanı lblEtiket.Text = blgBilgi.Etiketler.ToString() ' Blog Etiketleri blgBilgi = Nothing pUrlAl.Visible = False pAlan.Visible = True Else lblHata.Text = "Blograzzi de kayıtlı blog bulunamadı!" End If End Sub Protected Sub btnTekrar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnTekrar.Click lblHata.Text = Nothing pUrlAl.Visible = True pAlan.Visible = False End Sub End Class
Kullanıcı Adı
Şifre
Beni hatırla
şifremi unuttum