
|
|
EN SON EKLENEN MAKALELER
|
ASP.NET'te TextBox'ın İçerisine Default Değer Getirme
|
|
|
|
Asp.NET ile uğraşırken TextBox içerisine değer getirmem gerekti. Örneğin : Kullanıcı Adını Giriniz gibi. Ama her hangi birşey yazılmaz ise tekrar text alan gelecekti. Bu kodu yazının devamında bulabilirsiniz.
|
|
etiketler : Asp.NET
|
06.02.2010 | ASP.Net | Okunma (44) | Yorumlar (0)
| Paylaş :
|
|
|
|
T-SQL ve DateTime
|
|
|
|
Geçenlerde t-sql de date formatları lazım olmuştu biraz araştırdıktan çok güzel bir örnek buldum.Sizinde işinize kesinlikle yarayacaktır.Sql sorgularımızda kullanabileceğimiz tarih ve saat formatları üzerine kullanışlı bir tabloyu ve tarih işlemleri için çağırabileceğimiz bazı fonksiyonları aşağıda bulabilirsiniz;
|
|
etiketler : T-SQL, DateTime, SQL Server
|
06.02.2010 | SQL Server | Okunma (23) | Yorumlar (0)
| Paylaş :
|
|
|
|
|
|
|
|
Microsoft Dynamics CRM Webinerleri
|
|
|
İş stresinden ve günün yorgunluğundan kurtulun. Yakın arkadaşlarımdan Microsoft Dynamics CRM MVP’si Barış KANLICA sizi CRM’li 8 geceye davet ediyor.
Microsoft Dynamics CRM’in yeteneklerini, iş gücünü, her firmaya yaptığı işe göre uyarlanabilen esnek mimarisini keşfetme zamanı; şimdi CRM zamanı. Dynamics CRM, iş akışları sayesinde sizin yerinize otomatik görevler oluştursun, mailler atsın. Dahası her yerden CRM’e ulaşın. 21:00-22:00 saatleri arasında yapılacak olan web seminerlerimize hepiniz davetlisiniz.
|
|
etiketler : Dynamics CRM, Webiner
|
26.01.2010 | MS CRM 4.0 | Okunma (113) | Yorumlar (0)
| Paylaş :
|
|
|
|
ASP.NET Gridview'daki Kayıtları Word, Excel, PDF ve CSV Formatlarına Aktarma
|
|
|
Bu makalemizde Gridview'daki kayıtlarımızı Word, Excel, PDF ve CSV formatlarına nasıl aktaracağımızı öğreneceğiz. ASP.NET ile Word,Excel ve CSV formatlarına 3. parti yazılımlar gerektirmeden kolayca aktarım sağlarken , PDF'e veri aktarımında ise ücretsiz 3. parti bir yazılım olan iTextSharp tool'unu kullanacağız. Öncelikle aktarım için Gridview içerisinde biraz veri bulunması gerekmekte. Bunun için Northwind Database'nden Customers kayıtlarını Gridview'e dolduruyorum. Gridview’mızın HTML çıktısı aşağıdaki gibidir ;
|
|
etiketler : Asp.NET, Export Gridview to PDF, Export Gridview to Word, Export Gridview to Excel, Export Gridview to CSV
|
23.01.2010 | ASP.Net | Okunma (330) | Yorumlar (8)
| Paylaş :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Siteyi Çabuk İndexletmek
|
|
|
|
Arkadaşlar seo ile ilgili bu yazımızda sitenizi nasıl
daha önce indexleteceksiniz ondan bahsedeceğim.Biliyorsunuz ki bazı
forumlarda,sitelerde işte şu kadar kısa süre içinde sitemi indexlettim
felan gibilerinden yorumlar bulunmakta.Siz bunları okurken “yav arkadaş
nasıl oluyor da bu kadar kısa sürede indexletiyorlar” diyorsanız.Şimdi
konuyu iyice okuyun.
|
|
etiketler : Google, Site İndex
|
08.01.2010 | ASP.Net | Okunma (268) | Yorumlar (0)
| Paylaş :
|
|
|
|
Asp.net ile Hava Durumu Bilgileri Görüntüleme - C#
|
|
|
private void downloadButton_OnClick(object sender, System.EventArgs e) { string url = "http://xml.progen.com.tr/havadurumu.php?s=istanbul"; string bilgicek = GetHTML(url); string ds = Strings.InStr(1, bilgicek, "<durum>"); string de = Strings.InStr(1, bilgicek, "</durum>"); string durum = Strings.Mid(bilgicek, ds, de - ds); string ss = Strings.InStr(1, bilgicek, "<sicaklik>"); string se = Strings.InStr(1, bilgicek, "</sicaklik>"); string sicaklik = Strings.Mid(bilgicek, ss, se - ss); Response.Write("Durum: " + durum + "<br>Sycaklyk: " + sicaklik); } private string GetHTML(string strURL) { WebResponse objResponse = null; string strHTML = null; try { Uri objUri = new Uri(strURL); WebRequest objRequest = WebRequest.Create(objUri); objResponse = objRequest.GetResponse; Stream objStream = objResponse.GetResponseStream; Encoding encode = System.Text.Encoding.UTF8; StreamReader objReader = new StreamReader(objStream, encode); strHTML = objReader.ReadToEnd; } catch (Exception ex) { return ex.ToString; } finally { objResponse.Close(); } return strHTML; }
|
|
etiketler : Microsoft, Asp.NET
|
06.01.2010 | ASP.Net | Okunma (214) | Yorumlar (5)
| Paylaş :
|
|
|
|
Asp.net ile Hava Durumu Bilgileri Görüntüleme
|
|
|
<%@ page language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<script language="VB" runat="server">
Private Sub downloadButton_OnClick(ByVal sender As Object, ByVal e As System.EventArgs) Dim url As String = "http://xml.progen.com.tr/havadurumu.php?s=istanbul" Dim bilgicek As String = GetHTML(url) Dim ds As String = Strings.InStr(1, bilgicek, "<durum>") Dim de As String = Strings.InStr(1, bilgicek, "</durum>") Dim durum As String = Strings.Mid(bilgicek, ds, de - ds) Dim ss As String = Strings.InStr(1, bilgicek, "<sicaklik>") Dim se As String = Strings.InStr(1, bilgicek, "</sicaklik>") Dim sicaklik As String = Strings.Mid(bilgicek, ss, se - ss) Response.Write(("Durum: " & durum & "<br>Sycaklyk: ") + sicaklik) End Sub Private Function GetHTML(ByVal strURL As String) As String Dim objResponse As WebResponse = Nothing Dim strHTML As String = Nothing Try Dim objUri As New Uri(strURL) Dim objRequest As WebRequest = WebRequest.Create(objUri) objResponse = objRequest.GetResponse Dim objStream As Stream = objResponse.GetResponseStream Dim encode As Encoding = System.Text.Encoding.UTF8 Dim objReader As New StreamReader(objStream, encode) strHTML = objReader.ReadToEnd Catch ex As Exception Return ex.ToString Finally objResponse.Close() End Try Return strHTML End Function
</script>
<form id="Form1" runat="server">
<asp:button id="downloadButton" runat="server" text="Download"
tabindex="2" onclick = "downloadButton_OnClick"></asp:button>
</form>
|
|
etiketler : Microsoft, Asp.NET, Hava Durumu
|
06.01.2010 | ASP.Net | Okunma (124) | Yorumlar (0)
| Paylaş :
|
|
|
|
Asp.net ile Döviz Kuru Bilgileri Görüntüleme
|
|
|
|
<%@ page language="VB" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="VB" runat="server"> Private Sub downloadButton_OnClick(ByVal sender As Object, ByVal e As System.EventArgs) Dim url As String = "http://www.tcmb.gov.tr/kurlar/today.html" Dim strVeri As String = GetHTML(url) Dim iDolar As String = InStr(strVeri, "USD") Dim iEuro As String = InStr(strVeri, "EUR") Dim strDolarAlis As String = Mid(strVeri, iDolar + 38, 10) Dim strDolarSatis As String = Mid(strVeri, iDolar + 51, 10) Dim strEuroAlis As String = Mid(strVeri, iEuro + 38, 11) Dim strEuroSatis As String = Mid(strVeri, iEuro + 51, 11) Response.Write(strDolarAlis & "<br>") Response.Write(strDolarSatis & "<br>") Response.Write(strEuroAlis & "<br>") Response.Write(strEuroSatis) End Sub Private Function GetHTML(ByVal strURL As String) As String Dim objResponse As WebResponse = Nothing Dim strHTML As String Try Dim objUri As Uri = New Uri(strURL) Dim objRequest As WebRequest = WebRequest.Create(objUri) objResponse = objRequest.GetResponse Dim objStream As Stream = objResponse.GetResponseStream
Dim encode As Encoding = System.Text.Encoding.UTF8 Dim objReader As StreamReader = New StreamReader(objStream, encode) strHTML = objReader.ReadToEnd Catch ex As Exception Return ex.ToString Finally objResponse.Close() End Try Return strHTML End Function Private Function Post(ByVal strURL As String, ByVal strPostData As String) As String Dim objResponse As WebResponse = Nothing Dim strResult As String = Nothing Try Dim objUri As Uri = New Uri(strURL) Dim objRequest As WebRequest = WebRequest.Create(objUri) objRequest.Method = "POST" objRequest.ContentType = "application/x-www-form-urlencoded" Dim UrlEncoded As StringBuilder = New StringBuilder Dim reserved As Char() = {"?"c, "="c, "&"c} Dim SomeBytes As Byte() = Nothing If Not (strPostData Is Nothing) Then Dim i As Integer = 0 Dim j As Integer While i < strPostData.Length j = strPostData.IndexOfAny(reserved, i) If j = -1 Then UrlEncoded.Append(HttpUtility.UrlEncode(strPostData.Substring(i, strPostData.Length - i))) ' break End If UrlEncoded.Append(HttpUtility.UrlEncode(strPostData.Substring(i, j - i))) UrlEncoded.Append(HttpUtility.UrlEncode(strPostData.Substring(j, 1))) i = j + 1 End While SomeBytes = Encoding.UTF8.GetBytes(UrlEncoded.ToString) objRequest.ContentLength = SomeBytes.Length Dim objStream As Stream = objRequest.GetRequestStream objStream.Write(SomeBytes, 0, SomeBytes.Length) objStream.Close() Else objRequest.ContentLength = 0 End If objResponse = objRequest.GetResponse Dim objReceiveStream As Stream = objResponse.GetResponseStream Dim encode As Encoding = System.Text.Encoding.UTF8 Dim objReader As StreamReader = New StreamReader(objReceiveStream, encode) strResult = objReader.ReadToEnd Catch ex As Exception Return ex.ToString Finally If Not (objResponse Is Nothing) Then objResponse.Close() End If End Try Return strResult End Function </script> <form id="Form1" runat="server"> <asp:button id="downloadButton" runat="server" text="Download" tabindex="2" onclick = "downloadButton_OnClick"></asp:button> </form>
|
|
etiketler : Döviz Kur, Asp.NET
|
02.01.2010 | ASP.Net | Okunma (167) | Yorumlar (0)
| Paylaş :
|
|
|
|
Active Directory Kullanıcı Adı Değiştirme
|
|
|
private void ChangeUserADPassword(string Username, string Password, string newPwd) { string dcDNS = "whatever.com"; string rootDN = null; DirectoryEntry rootDSE = default(DirectoryEntry); DirectoryEntry searchRoot = default(DirectoryEntry); DirectoryEntry userEntry = default(DirectoryEntry); DirectorySearcher searcher = default(DirectorySearcher); SearchResultCollection results = default(SearchResultCollection); SearchResult result = default(SearchResult); string oldPassword = Password; string newPassword = newPwd; try { //========================================================================= //Here I am binding the directory to the root with the current //users name and password instead of using an admin login to authenticate //The reason for this is that the users are not admin and only admin //can use the setpassword invoke method. thus, authenticated users will //use the change password method //note the authenicationtypes here //you need to either use SecureSocketsLayer or Kerberos (Secure + Sealing) result = null; rootDSE = new DirectoryEntry(string.Format("LDAP://{0}/rootDSE", dcDNS), Username, oldPassword, AuthenticationTypes.Secure | AuthenticationTypes.Sealing | AuthenticationTypes.ServerBind); rootDN = (string)rootDSE.Properties("defaultNamingContext").Value; searchRoot = new DirectoryEntry(string.Format("LDAP://{0}/{1}", dcDNS, rootDN), Username, oldPassword, AuthenticationTypes.Secure | AuthenticationTypes.Sealing | AuthenticationTypes.ServerBind); //================================================================== //------------------------------------------------------------------------ //Find the user by their username in the directory using the //DirectorySearcher() searcher = new DirectorySearcher(searchRoot); searcher.Filter = string.Format("sAMAccountName={0}", Username); searcher.SearchScope = SearchScope.Subtree; searcher.CacheResults = false; results = searcher.FindAll; //------------------------------------------------------------------------- //***************************************************** foreach (var result in results) { //only use this method on .NET 1.1 or higher //otherwise, get the adsPath value and build a new //DirectoryEntry with the supplied credentials userEntry = result.GetDirectoryEntry(); break; // TODO: might not be correct. Was : Exit For } //this is redundant because sAMAccountName is unique //in the domain, but it is done for clarity //Bind the user's DirectoryEntry (found from result search) //result = Nothing userEntry = result.GetDirectoryEntry(); if (userEntry == null) { Label4.Text = "User not found in this domain."; return; } //Invoke the ChangePassword method (not the SetPassword method, since that //is used by admins to reset a password) userEntry.Invoke("ChangePassword", new object[] { oldPassword, newPassword }); userEntry.CommitChanges(); //**************************************************** Label4.Text = "Password Changed Successfully"; if ((Session("User") != null)) { txtuser.Text = (string)Session("User"); GetUserPasswordADInfo((string)Session("User")); } else { GetUserPasswordADInfo(Strings.Trim(txtuser.Text)); } } catch (Exception ex) { //System.Reflection.TargetInvocationException Label4.Text = ex.Message; } finally { //these prevent other memory leaks userEntry = null; if ((userEntry != null)) userEntry.Dispose(); results = null; if ((results != null)) results.Dispose(); searcher = null; if ((searcher != null)) searcher.Dispose(); searchRoot = null; if ((searchRoot != null)) searchRoot.Dispose(); rootDSE = null; if ((rootDSE != null)) rootDSE.Dispose(); } }
Kaynak Hatırlamıyorum :( O yüzden Anonim
|
|
etiketler : Asp.NET, Active Directory
|
02.01.2010 | ASP.Net | Okunma (123) | Yorumlar (0)
| Paylaş :
|
|
|
|
Label'a Link Verme
|
|
|
Label1.Text = "<input type=button value=xxx onclick=\"javascript:window.open('http://www.google.com',null,'left=0,top=0,height=300,width=300)\"";
Aklımda duracağına sitem dursun :)
|
|
etiketler :
|
02.01.2010 | ASP.Net | Okunma (0) | Yorumlar (0)
| Paylaş :
|
|
|
|
EN ÇOK OKUNAN MAKALELER
|
ASP.NET GÜVENLİK
|
|
|
|
NET ’te güvenlik denilince akla gelen iki ana başlık Authentication ve Autherization’dır.
|
|
etiketler :
|
02.09.2007 | ASP.Net | Okunma (3286) | Yorumlar (3)
| Paylaş :
|
|
|
|
|
|
|
|
Asp.NET için 25 Örnek
|
|
|
|
Asp.NET için hazırlanmış 25 güzel gıcır gıcır örnek...
|
|
etiketler :
|
05.09.2007 | ASP.Net | Okunma (2721) | Yorumlar (2)
| Paylaş :
|
|
|
|
|
|
|
|
|
|
|
|
Online Ziyaretçi Sayısı
|
|
|
|
Bugün eski dosyalarımın arasında gezerken Asp.NET öğrenirken online ziyaretçi sayısını bulduğum örneği buldum ve sizle paylaşmak istedim...
|
|
etiketler :
|
07.09.2007 | ASP.Net | Okunma (1986) | Yorumlar (4)
| Paylaş :
|
|
|
|
|
|
|
|
NESNE TABANLI PROGRAMLAMA (OOP)
|
|
|
Nesne tabanlı programlama (object-oriented programming-OOP), program geliştirmek için kullanılan bir teknolojidir. OOP terimi değişik anlamlar taşımakla birlikte sağladığı standartlarla bileşen (component) programlamasını kolaylaştırmaktadır. Visual Basic özünde nesne-temelli bir programlama dilidir. Çok sayıda nesne hazır olarak Visual Basic içinde bulunur programcılar bu nesneleri kullanarak program yazarlar.
|
|
etiketler :
|
12.10.2007 | C#.Net | Okunma (1859) | Yorumlar (0)
| Paylaş :
|
|
|
|
|
|
|
|
|
|
|
|
|