Sponsored By

senol

Members
  • Content Count

    2
  • Joined

  • Last visited

About senol

  • Rank
    Member
  1. UPLOAD bu class public static void ResimYükle(HtmlInputFile HtmlInput, string id,string Klasor,string KatID) { string path_file; path_file = id; string KlasorAdi; KlasorAdi = Klasor; string Kat_ID; Kat_ID = KatID; if (HtmlInput.PostedFile.FileName.ToString() != "") { Directory.CreateDirectory(HttpContext.Current.Serv er.MapPath("FirmaSiteleri/" + path_file + "/" + KlasorAdi + "/" + Kat_ID));//KLASÖR OLUŞTUR HtmlInput.PostedFile.SaveAs(HttpContext.Current.Se rver.MapPath("FirmaSiteleri/" + path_file + "/" + KlasorAdi + "/" + Kat_ID + "/" + Path.GetFileName(HtmlInput.PostedFile.FileName) ));// İLGİLİ KAYDET } } bu dizayn <%@ Page Language="C#" AutoEventWireup="true" CodeFile="BenimSayfamLogo.aspx.cs" Inherits="BenimSayfamLogo" %> <!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>Logo</title> </head> <body> <form~/BenimSayfam.aspx">Önceki Sayfaya Geç</asp:HyperLink> <asp:HyperLink~/BenimsayfamKategoriHakkimizda.aspx" Width="191px">Hakkımızda Sayfasına Dön</asp:HyperLink><br /> <br /> Firma Logonuz <input /><br /> <br /> </div> </form> </body> </html> cs codu using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; using System.Text; public partial class BenimSayfamLogo : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (Session["ID"] != null) { } else { Response.Redirect("Default.aspx"); } } protected void Button1_Click(object sender, EventArgs e) { if (Path.GetExtension(File1.PostedFile.FileName) == ".gif" || Path.GetExtension(File1.PostedFile.FileName) == ".jpg") { baglantitable.Sorgu_Calistir("Update tbl_firma set firmalogo=’" + Path.GetFileName(File1.PostedFile.FileName) + "’ where["ID"]); baglantitable.ResimYükle(File1, Session["ID"].ToString(), "Logo", Session["ID"].ToString()); } else { string hataAc; hataAc = "<script>" + "alert(’Logo Resmi Jpg veya Gif Resmi Seçmelisiniz !’)" + "</script>"; Page.RegisterStartupScript("JavaScript", hataAc.ToString()); } } } LOGiN al kadeşim user ve pass sorguladıktan sonra hadi onuda eklim al bu class public static Boolean Oturumu_Ac(string Table_name, string User_Name, string User_pass) { MySqlCommand Oturum_sql = new MySqlCommand("select * from " + Table_name + " where lbl_k=’" + User_Name + "’ and sifre=’" + User_pass + "’ and site=’2′ ", sqlBaglanti); if (Oturum_sql.Connection.State == ConnectionState.Closed) { sqlBaglanti.Open(); } MySqlDataReader sql_oku = Oturum_sql.ExecuteReader(); if (sql_oku.Read()) { HttpContext.Current.Session["ID"] = sql_oku["id"].ToString(); sqlBaglanti.Close(); return true; } else { sqlBaglanti.Close(); return false; } } al bu cs if (baglantitable.Oturumu_Ac("tablo", txtKullanici.Text, txtSifre.Text) == true) { Session["Login"] = "true"; Response.Redirect("musteri.aspx"); } else { Session["Login"] = "false"; lblHata.Visible = true; lblHata.Text = "LÃœTFEN KULLANICI ADI VE ŞİFRENİZİ DOĞRU GİRİNİZ !"; } buda diyer sayfalara geçinde Session kontrolu,, protected void Page_Load(object sender, EventArgs e) { if (Session["ID"] != null) { } else { Response.Redirect("Default.aspx"); } } bu kadar bilgi nerde mail using System.Web.Mail; MailMessage mailObj = new MailMessage(); MailMessage bize = new MailMessage(); mailObj.From = "[email protected]"; mailObj.To = TextBox2.Text; mailObj.Subject = "Bravilor Türkiye Fiyat Listesi "; mailObj.Body = "<strong>Bizi Tercih Ettiğiniz İçin Teşşekür Ederiz En Yakın Zamanda Size Geri Döneceğiz !</strong>"; mailObj.BodyFormat = MailFormat.Html; SmtpMail.SmtpServer = "localhost"; SmtpMail.Send(mailObj); bize.From = TextBox2.Text; bize.To = "[email protected]"; bize.Subject = "Bravilor Türkiye Yeni Fiyat Talebi"; bize.Body = "<strong>Fiyat Talep Var </strong>"; bize.BodyFormat = MailFormat.Html; SmtpMail.SmtpServer = "localhost"; SmtpMail.Send(bize);
  2. senol

    Help With Xml

    All of the major browsers understand XML. Better than HTML, in some cases. C# CODE using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.IO; using System.Text; using System.Xml; public partial class XmlOlustur : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { DataView XmlSag = personel_kontrol.Toplam_kayitlar("select * from User_Haber where HResim_Yer='2' and Haber_Durum='Evet'"); XmlTextWriter writer = new XmlTextWriter(Server.MapPath("bigsale1.xml"), System.Text.Encoding.UTF8); writer.WriteStartDocument(); writer.WriteComment("The Program "); writer.Formatting = Formatting.Indented; writer.WriteStartElement("bigSale"); for (int FlasId = 0; FlasId < XmlSag.Count; FlasId++) { //writer.WriteElementString("image", null); //writer.WriteAttributeString("picUrl", "Haber/" + XmlSag[FlasId]["DilID"].ToString() + "/Resimler/" + XmlSag[FlasId]["Haber_Resim"].ToString()); //writer.WriteAttributeString("linkUrl", "Yonlendir.aspx?ID=" + XmlSag[FlasId]["DilID"].ToString()); //writer.WriteAttributeString("title", XmlSag[FlasId]["Haber_Tarih"].ToString()); writer.WriteStartElement("image", null); writer.WriteAttributeString("picUrl", "Haber/" + XmlSag[FlasId]["DilID"].ToString() + "/Resimler/" + XmlSag[FlasId]["Haber_Resim"].ToString()); writer.WriteAttributeString("linkUrl", "Yonlendir.aspx?ID=" + XmlSag[FlasId]["DilID"].ToString()); writer.WriteAttributeString("title", XmlSag[FlasId]["Haber_Tarih"].ToString()); writer.WriteEndElement(); } writer.Flush(); writer.Close(); } } XML SAMPLE <?xml version="1.0" encoding="utf-8"?><!--The Program --> <bigSale> <image picUrl="Haber/Tr/Resimler/img3.jpg" linkUrl="Yonlendir.aspx?ID=Tr" title="17.06.2008" /> <image picUrl="Haber/Tr/Resimler/img2.jpg" linkUrl="Yonlendir.aspx?ID=Tr" title="17.06.2008" /> </bigSale>