Değişik

string curlink = Request.RawUrl;
            if (curlink.Contains("/Default.aspx"))
            {
                anasayfa.Attributes["class"] = "active";
            }

            else if (curlink.Contains("/Ogretmen.aspx"))
            {
                //LinkButton1.Attributes["LinkButton1"] = LinkButton1.PostBackUrl = curlink;
                //LinkButton1.Attributes["LinkButton1"] = LinkButton1.Text = "Öğretmen Verileri";
                ogretmen.Attributes["class"] = "active";
                Label1.Attributes["Label1"] = Label1.Text = "Öğretmen Verileri";
            }
            else if (curlink.Contains("/Dersler.aspx"))
            {
                Label1.Attributes["Label1"] = Label1.Text = "Ders Verileri";
                dersler.Attributes["class"] = "active";
            }

Yorumlar

Bu blogdaki popüler yayınlar

Asp.Net ile Uyarı Mesajları Vermek (msgbox)

Asp.Net Eval Kullanımı

Asp.Net ile T.C. Kimlik Doğrulama (Mernis) Web Service ile