13.07.2015 Views

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

ASP.NET 3.5: A Beginner's Guide - www.mustafaof.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

436<strong>ASP</strong>.<strong>NET</strong> <strong>3.5</strong>: A Beginner’s <strong>Guide</strong>C# Default.aspx.csusing System;public partial class _Default : System.Web.UI.Page{private int counter;private string pixName;protected void Button1_Click(object sender, EventArgs e){//previousif (Convert.ToInt16(Label1.Text) >= 2){counter = Convert.ToInt16(Label1.Text);counter--;Label1.Text = Convert.ToString(counter);pixName = "pix" + counter + ".jpg";Image1.ImageUrl = "~/images/" + pixName;}}protected void Button2_Click(object sender, EventArgs e){//nextif (Convert.ToInt16(Label1.Text)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!