<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-18900255</id><updated>2011-12-15T04:59:30.097+02:00</updated><title type='text'>ASP .NET</title><subtitle type='html'>Code Samples using C# by Kerem Kosaner</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://keremkosaneraspnet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18900255.post-114891294777908352</id><published>2006-05-29T17:27:00.000+03:00</published><updated>2006-05-29T17:29:07.780+03:00</updated><title type='text'>DATALIST-I : DATABIND</title><content type='html'>&lt;span style="font-family: verdana;font-size:85%;" &gt;System.Web.UI.WebControls.DataList Datalist;&lt;br /&gt;&lt;br /&gt;public void DataListDataBind()&lt;br /&gt;{&lt;br /&gt;ArrayList list = new ArrayList();&lt;br /&gt;           &lt;br /&gt;list = SampleMethod() ;  // fill the arrayList&lt;br /&gt;&lt;br /&gt;Datalist.DataSource=list;&lt;br /&gt;Datalist.DataBind();&lt;br /&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-114891294777908352?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891294777908352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891294777908352'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2006/05/datalist-i-databind.html' title='DATALIST-I : DATABIND'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-114891276531537457</id><published>2006-05-29T17:23:00.000+03:00</published><updated>2006-05-29T17:27:13.020+03:00</updated><title type='text'>DROPDOWNLIST : SET</title><content type='html'>&lt;span style=";font-family:verdana;font-size:85%;"  &gt;System.Web.UI.WebControls.DropDownList ddl;&lt;br /&gt;&lt;br /&gt;public setDropDownList(string text, string value)&lt;br /&gt;{&lt;br /&gt;ListItem item = new ListItem(text,value);&lt;br /&gt;ddl.Items.Add(item);&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-114891276531537457?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891276531537457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891276531537457'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2006/05/dropdownlist-set.html' title='DROPDOWNLIST : SET'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-114891229672024662</id><published>2006-05-29T17:15:00.000+03:00</published><updated>2006-05-29T17:21:57.176+03:00</updated><title type='text'>DATAGRID-III : MS EXCEL</title><content type='html'>&lt;span style=";font-family:verdana;font-size:85%;"  &gt;public class ExcelCreator&lt;br /&gt;{&lt;br /&gt;  public static void DataSetToExcel(int aid,DataSet dataSet,HttpResponse response)&lt;br /&gt;  {&lt;br /&gt;  response.Clear();&lt;br /&gt;  response.ContentType="application/vnd.ms-excel";&lt;br /&gt;  response.Charset="iso-8859-9";&lt;br /&gt;&lt;br /&gt;  StringWriter stringWriter=new StringWriter();&lt;br /&gt;  HtmlTextWriter htmlTextWriter=new HtmlTextWriter(stringWriter);&lt;br /&gt;&lt;br /&gt;  DataGrid dataGrid=new DataGrid();&lt;br /&gt;  dataGrid.DataSource=dataSet.Tables[0];&lt;br /&gt;  dataGrid.DataBind();&lt;br /&gt;  dataGrid.RenderControl(htmlTextWriter);&lt;br /&gt;  response.Write(stringWriter.ToString());&lt;br /&gt;  response.End();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ExcelCreator.DataSetToExcel(aid,em.GetAllEstates(aid),Response);&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-114891229672024662?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891229672024662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891229672024662'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2006/05/datagrid-iii-ms-excel.html' title='DATAGRID-III : MS EXCEL'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-114891102352794622</id><published>2006-05-29T16:55:00.000+03:00</published><updated>2006-05-29T17:21:11.030+03:00</updated><title type='text'>DATAGRID-II : PAGING</title><content type='html'>&lt;span style="font-family:arial;"&gt;S&lt;/span&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;ystem.Web.UI.WebControls.DataGrid Datagrid;&lt;br /&gt;&lt;br /&gt;private void GridPageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)&lt;br /&gt;{&lt;br /&gt; Datagrid.CurrentPageIndex = e.NewPageIndex;&lt;br /&gt;&lt;br /&gt; ArrayList list = new ArrayList();&lt;br /&gt;&lt;br /&gt; list = SampleMethod() ;  // fill the arrayList&lt;br /&gt;&lt;br /&gt; if(list.Count!=0)&lt;br /&gt; {&lt;br /&gt;     Datagrid.DataSource=list;&lt;br /&gt;     Datagrid.DataBind();&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add this line to the PageLoad() or  InitializeComponent()&lt;br /&gt;&lt;br /&gt;this.Datagird.PageIndexChanged += new System.Web.UI.WebControls.DataGridPageChangedEventHandler(this.GridPageIndexChanged);&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-114891102352794622?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891102352794622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891102352794622'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2006/05/datagrid-ii-paging.html' title='DATAGRID-II : PAGING'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-114891081343444678</id><published>2006-05-29T16:51:00.000+03:00</published><updated>2006-05-29T17:30:41.436+03:00</updated><title type='text'>DATAGRID-I : DATABIND</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;System.Web.UI.WebControls.DataGrid Datagrid;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;public void DatalistDAtaBind()&lt;br /&gt;{&lt;br /&gt;ArrayList list = new ArrayList();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;list = SampleMethod() ;  // fill the arrayList&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Datagrid.DataSource = list;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Datagrid.DataBind();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-114891081343444678?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891081343444678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/114891081343444678'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2006/05/datagrid-i-databind.html' title='DATAGRID-I : DATABIND'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-113225601701644575</id><published>2005-11-17T21:21:00.000+02:00</published><updated>2006-01-21T22:10:15.593+02:00</updated><title type='text'>ASP.NET : SEND EMAIL-II</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;using System.Web.Mail;&lt;br /&gt;...&lt;br /&gt;protected void Button1_Click(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string fromAddress = "&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;asp@asp.net&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string fromName = "Kerem Kosaner";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string toAddress = "&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;asp@asp.com&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string toName = "Kerem Kosaner";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string msgSubject = "E-Mail";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string msgBody = "Hello";&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;MailMessage Message = new MailMessage();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Message.To = toAddress;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Message.From = fromAddress;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Message.Subject = msgSubject;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Message.Body = msgBody;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Message.Attachments.Add(new MailAttachment("c:\\photo.jpg")); //sample attachment&lt;br /&gt;SmtpMail.SmtpServer = "your mail server name goes here";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;SmtpMail.Send(Message);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;}&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-113225601701644575?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113225601701644575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113225601701644575'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2005/11/aspnet-send-email-ii.html' title='ASP.NET : SEND EMAIL-II'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-113225513925248192</id><published>2005-11-17T21:10:00.000+02:00</published><updated>2005-11-29T21:18:58.966+02:00</updated><title type='text'>ASP.NET : SEND EMAIL - I</title><content type='html'>&lt;span style="font-family:verdana;font-size:85%;"&gt;Example of how to send emails using the new ASP.NET v2 SMTP Class. Note: If mailserver runs local and does not need authentication, you can delete the SMTPServer configuration lines:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;using System.Net.Mail;&lt;br /&gt;...&lt;br /&gt;protected void Button1_Click(object sender, EventArgs e)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string SMTPServer = "mail.server.asp"; // mail server address&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string fromAddress = "&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;asp@asp.net&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string fromName = "Kerem Kosaner";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string toAddress = "&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;asp@asp.com&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string toName = "Kerem Kosaner";&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;string msgSubject = "E-Mail";string msgBody = "Hello"; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;SmtpClient client = new SmtpClient(SMTPServer);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;client.Credentials= new System.Net.NetworkCredential("&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;asp@asp.net&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;", "password");&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;MailAddress from = new MailAddress(fromAddress, fromName);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;MailAddress to = new MailAddress(toAddress, toName);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;MailMessage message = new MailMessage(from, to); &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;m&lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;essage.Subject = msgSubject;message.Body = msgBody; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;client.Send(message);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;}&lt;/span&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-113225513925248192?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113225513925248192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113225513925248192'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2005/11/aspnet-send-email-i.html' title='ASP.NET : SEND EMAIL - I'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-113188170945495436</id><published>2005-11-13T13:29:00.001+02:00</published><updated>2005-11-15T20:57:36.880+02:00</updated><title type='text'>ASP.NET : READ/WRITE FILE</title><content type='html'>&lt;span style="font-family:Verdana;font-size:85%;"&gt;How to read a file and write a line of text to a file called asp.txt :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;hr /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;using System;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;using System.IO;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;TextReader tr = new StreamReader("asp.txt");&lt;br /&gt;// read a line of text &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Console.WriteLine(tr.ReadLine());&lt;br /&gt;// close the stream &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;tr.Close();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;TextWriter tw = new StreamWriter("asptxt");&lt;br /&gt;// write a line of text to the file &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;tw.WriteLine(DateTime.Now);&lt;br /&gt;// close the stream &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;tw.Close();&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-113188170945495436?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113188170945495436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113188170945495436'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2005/11/aspnet-readwrite-file.html' title='ASP.NET : READ/WRITE FILE'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-113188134270444612</id><published>2005-11-13T13:28:00.001+02:00</published><updated>2005-11-15T21:07:11.400+02:00</updated><title type='text'>C#</title><content type='html'>&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;In June 2000, Microsoft announced both the .NET platform and a new programming language called C#. C# is a strongly-typed object-oriented language designed to give the optimum blend of simplicity, expressiveness, and performance. The .NET platform is centered around a Common Language Runtime (similar to a JVM) and a set of libraries which can be exploited by a wide variety of languages which are able to work together by all compiling to an intermediate language (IL). C# and .NET are a little symbiotic: some features of C# are there to work well with .NET, and some features of .NET are there to work well with C# (though .NET aims to work well with many languages). This article is mostly concerned with C#, but sometimes it is useful to discuss .NET too. The C# language was built with the hindsight of many languages, but most notably Java and C++. It was co-authored by Anders Hejlsberg (who is famous for the design of the Delphi language), and Scott Wiltamuth.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;em&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;span style="font-family:Georgia;font-size:100%;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;&lt;em&gt;C# and Java :&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Below is a list of features C# and Java share, which are intended to improve on C++. These features are not the focus of this article, but it is very important to be aware of the similarities.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;* Compiles into machine-independent language-independent code which runs in a managed execution environment.&lt;br /&gt;* Garbage Collection coupled with the elimination of pointers (in C# restricted use is permitted within code marked unsafe)&lt;br /&gt;* Powerful reflection capabilities&lt;br /&gt;* No header files, all code scoped to packages or assemblies, no problems declaring one class before another with circular dependencies&lt;br /&gt;* Classes all descend from object and must be allocated on the heap with new keyword&lt;br /&gt;* Thread support by putting a lock on objects when entering code marked as locked/synchronized&lt;br /&gt;Interfaces, with multiple-inheritance of interfaces, single inheritance of implementations&lt;br /&gt;* Inner classes&lt;br /&gt;* No concept of inheriting a class with a specified access level&lt;br /&gt;* No global functions or constants, everything belongs to a class&lt;br /&gt;* Arrays and strings with lengths built-in and bounds checking&lt;br /&gt;* The "." operator is always used, no more -&gt;, :: operators&lt;br /&gt;* null and boolean/bool are keywords&lt;br /&gt;* All values are initialized before use&lt;br /&gt;* Can't use integers to govern if statements&lt;br /&gt;* Try Blocks can have a finally clause &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;&lt;hr /&gt;&lt;em&gt;EXAMPLE:&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;strong&gt;&lt;em&gt;&lt;span style="font-family:Verdana;font-size:85%;"&gt;&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;strong&gt;&lt;em&gt;Java/C++:&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;public int getSize() &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{&lt;br /&gt;return size;&lt;br /&gt;}&lt;br /&gt;public void setSize (int value) &lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{&lt;br /&gt;size = value;&lt;br /&gt;}&lt;br /&gt;&lt;strong&gt;C#:&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;public int Size&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;{&lt;br /&gt;get {return size;}&lt;br /&gt;set {size = value;}&lt;br /&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-113188134270444612?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113188134270444612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113188134270444612'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2005/11/c.html' title='C#'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-113188132891757903</id><published>2005-11-13T13:28:00.000+02:00</published><updated>2005-11-15T20:58:45.846+02:00</updated><title type='text'>ASP.NET vs ASP</title><content type='html'>&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;Main advantage of ASP.NET compared to ASP is object oriented approach to software development. Well, ASP does support classes. VBScript and JavaScript allowed writing code using classes and objects. You could write an object-oriented business logic layer but this layer was encapsulated into COM and COM+ (DCOM) objects.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;&lt;br /&gt;This is the first time Microsoft made so cardinal change to its technology and almost completely abandoned support of earlier versions of ASP in ASP.NET. Although Microsoft does declare that you can gradually integrate ASP.NET code into an existing application written in ASP in reality that doesn’t make much sense.&lt;br /&gt;&lt;br /&gt;Due to new approach to application development Microsoft developed a completely new class structure that can aid in development of different types of applications. This library is well structured and all classes inherit from one ancestor – Object class.&lt;/span&gt; &lt;/div&gt;&lt;br /&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;ASP.NET is more than the next version of active server pages (ASP) &lt;/span&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;,it is the unified web development platform that provides the services necessary for developers to build enterprise-class web applications. ASP.NET is a compiled, .NET -based environment; you can author applications in any. NET compatible languages including ASP.NET, VB.NET and C#. NET Additionally, the entire .NET framework is available to any ASP.NET application.&lt;/span&gt; &lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-113188132891757903?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113188132891757903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113188132891757903'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2005/11/aspnet-vs-asp.html' title='ASP.NET vs ASP'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-18900255.post-113181121912252141</id><published>2005-11-12T17:59:00.000+02:00</published><updated>2005-11-15T20:59:17.026+02:00</updated><title type='text'>ASP.NET</title><content type='html'>&lt;div align="justify"&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;&lt;em&gt;"Writing dynamic, high-performance Web applications has never been easier"&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;font-size:85%;"&gt;ASP.NET combines unprecedented developer productivity with performance, reliability and deployment.&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;a name="productivity"&gt;&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Developer Productivity&lt;/strong&gt;&lt;br /&gt;ASP.NET helps you deliver real world Web applications in record time.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Easy Programming Model.&lt;/em&gt; ASP.NET makes building real world Web applications dramatically easier. ASP.NET server controls enable an HTML-like style of declarative programming that let you build great pages with far less code than with classic ASP. Displaying data, validating user input, and uploading files are all amazingly easy. Best of all, ASP.NET pages work in all browsers -- including Netscape, Opera, AOL, and Internet Explorer. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Flexible Language Options .&lt;/em&gt; ASP.NET lets you leverage your current programming language skills. Unlike classic ASP, which supports only interpreted VBScript and JScript, ASP.NET now supports more than 25 .NET languages (including built-in support for VB.NET, C#, and JScript.NET -- no tool required), giving you unprecendented flexibility in your choice of language. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/vstudio/nextgen/images/webformdesigner4.gif"&gt;&lt;/a&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Great Tool Support.&lt;/em&gt; You can harness the full power of ASP.NET using any text editor -- even Notepad! But Visual Studio .NET adds the productivity of Visual Basic-style development to the Web. Now you can visually design ASP.NET Web Forms using familiar drag-drop-doubleclick techniques, and enjoy full-fledged code support including statement completion and color-coding. VS.NET also provides integrated support for debugging and deploying ASP.NET Web applications. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align="justify"&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Rich Class Framework.&lt;/em&gt; Application features that used to be hard to implement, or required a 3rd-party component, can now be added in just a few lines of code using the .NET Framework. The .NET Framework offers over 4500 classes that encapsulate rich functionality like XML, data access, file upload, regular expressions, image generation, performance monitoring and logging, transactions, message queuing, SMTP mail, and much more! &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;p align="justify"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;&lt;span style="font-family:verdana;"&gt;From:www.asp.net&lt;/span&gt;&lt;/em&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18900255-113181121912252141?l=keremkosaneraspnet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113181121912252141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18900255/posts/default/113181121912252141'/><link rel='alternate' type='text/html' href='http://keremkosaneraspnet.blogspot.com/2005/11/aspnet.html' title='ASP.NET'/><author><name>Kerem Kosaner</name><uri>http://www.blogger.com/profile/03845257787392627459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='30' src='http://www.mywebmasterforum.com/images/hexcell/misc/noavatar.gif'/></author></entry></feed>
