• Giriş

Gorsel Programlama

  • AnaSayfa
  • Hakkımızda
  • TOP-10 Proje
  • Download
  • Özel Ders
  • Reklam Verin
  • Destek
  • İletişim
RSS feed
  • Youdao
  • Xian Guo
  • Zhua Xia
  • Google
  • My Yahoo!
  • newsgator
  • Bloglines
  • iNezha
© 2009-2020 Gorsel Programlama

Resim boyutunu (Enini ve Boyunu) isteğiniz değerlerle değiştir ve veri tabanına kaydet — Asp net

Resim boyutunu (Enini ve Boyunu) isteğiniz değerlerle değiştir ve veri tabanına kaydet — Asp net

 

resmin_boyutunu_degistir4

 

resmin_boyutunu_degistir

 

resmin_boyutunu_degistir2

 

Default.aspx.cs


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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>Asp.Net Çoklu Resim Yükleme</title>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/multi.js" type="text/javascript"></script>
<style type="text/css">
.auto-style1 {
width: 100%;
}
.auto-style2 {
width: 267px;
}
.auto-style3 {
}
.auto-style4 {
width: 267px;
height: 30px;
}
.auto-style5 {
height: 30px;
}
.auto-style6 {
height: 30px;
width: 116px;
}
.auto-style7 {
width: 116px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td class="auto-style2">
<asp:FileUpload ID="FileUpload1" runat="server" />
</td>
<td class="auto-style3" colspan="2">***Yeni En -Boy Değerlerini Giriniz.***</td>
</tr>
<tr>
<td class="auto-style4">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Kaydet" Width="128px" />
</td>
<td class="auto-style6">Eni&nbsp;&nbsp; (Width) :</td>
<td class="auto-style5">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
<td class="auto-style7">Boy (Height) :</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style2">Eski Hali :<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
</td>
<td class="auto-style7">Yeni Hali :
<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style2">
<asp:Image ID="Image1" runat="server" />
</td>
<td class="auto-style7">
<asp:Image ID="Image2" runat="server" />
</td>
<td>&nbsp;</td>
</tr>
</table>
</form>

 
resmin_boyutunu_degistir


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;//www.gorselprogramlama.com
using System.IO;
using System.Data.OleDb;

public partial class _Default : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string resimadi = null;//www.gorselprogramlama.com
resimadi = FileUpload1.FileName;
FileUpload1.SaveAs(Server.MapPath("Eskiimages/" + resimadi));
Bitmap resim = new Bitmap(Server.MapPath("Eskiimages/" + resimadi));
Image1.ImageUrl = "Eskiimages/" + resimadi;
Label2.Text = resim.Width + " * " + resim.Height;
Bitmap yresim = new Bitmap(resim, Convert.ToInt32(TextBox1.Text), Convert.ToInt32(TextBox2.Text));
yresim.Save(Server.MapPath("Yeniimages/" + resimadi));
Image2.ImageUrl = "Yeniimages/" + resimadi;
resimadi = "Yeniimages/" + resimadi;
Label3.Text = yresim.Width + " * " + yresim.Height;
OleDbConnection baglanti = new OleDbConnection("Provider=microsoft.ace.oledb.12.0;Data source=" + Server.MapPath("App_Data/data.accdb"));
baglanti.Open();
OleDbCommand cmd = new OleDbCommand("Insert Into Resimler(ResimYolu) values('" + resimadi + "')", baglanti);
cmd.ExecuteNonQuery();
baglanti.Close();
baglanti.Dispose(); //www.gorselprogramlama.com
}
catch
{
Response.Write(" *** Yeni dosya boyut girişi yapmalsınız ***");
}

}
}

 

Projeyi İNDİR

Paylaş :
Tweet
Yorum Yazın | Geri
3 Kasım Cuma,2017 Tarihinde Yayınlanmıştır. Bulunduğu Kategori : Asp Net
Etiket: asp net dersleri, asp net örnekleri, C#, C# ders, c# örnek, csharp dersleri, csharp örnekleri, Resim boyutunu (Enini ve Boyunu) isteğiniz değerlerle değiştir ve veri tabanına kaydet Asp net, resmi istenilen boyuta ayarla asp net, resmin boyunu değiştir asp net, resmin enini değiştir asp net, resmin height değerini değiştir asp net, resmin width değerini değiştir asp net
« Çoklu Resim Ekleme — Asp Net Bunu Demek istemiştiniz Uygulama sitesi — Asp Net »
Henüz Yorum Yok.

Yorum Yazın ...

Cevabı İptal
XHTML: Bu Etiketleri Kullanabilirsiniz : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
RSS Bu Yazıya Yapılan Yorumlar


Site içi Arama

Takip et: @GorselProgram







Böyle bir web sayfam olsun diyorsanız iletişim bölümünden veya gorselprogram@gmail.com mail adresinden bize ulaşabilirsiniz.

Son Yazılar

  • C# Console Application İçi Boş Üçgen
  • C# WindowsForm Çekiliş Uygulaması
  • C# WindowsForm Login Remember Me (Remember me Checkbox)
  • Migros market 2 Reklam Banner Örneği — Flash
  • C# WindowsForm ile TC Kimlik Numarası, İsim, Soyisim, E-Mail Kontrol Yapıları

Etiket Bulutu

.NET Application basit C# C#.NET application C#.NET codes C#.NET examples C#.NET lessons C#.NET practice C#.net örnekleri c# console dersleri c# console örnekleri C# ders c# dersleri c# örnek c# örnekleri C.net dersleri c dersleri code console console örnekleri Csharp csharp dersleri csharp net csharp örnekleri c örnekleri download Flash örnekleri forms Forms örnekleri full indir kod kodlar nesne tabanlı programlama OleDbConnection OleDbDataAdapter tam sürüm uygulama vb net win windows windows forms application örnek ücretsiz

Kategoriler

  • Access (59)
  • Akış Diyagramı Flowchart (69)
  • Android Eğitimleri (2)
  • Asp Net (47)
  • C# (830)
  • C# Console (222)
  • Css (19)
  • Dersler (191)
  • Dökümanlar (21)
  • Dreamweaver (12)
  • Excel (8)
  • Fireworks (27)
  • Flash (76)
  • Görsel Programlama (419)
  • GorselProgramlama.Com (8)
  • Html (34)
  • Pascal (2)
  • Photoshop (5)
  • PHP (2)
  • Planlar (114)
  • Programlama Tanım (4)
  • Sınavlar (128)
  • Sql (10)
  • VB 6.0 (45)
  • VB.NET (219)
  • Videolar (65)
  • Word (7)

Arşiv

Bağlantılar

  • Html Dersleri
  • Muslu.NET
  • Programlama Dersleri

Kimler Sitede ?


    Computers Blogs Top programming blogs

   sayaç Powered by WordPress | Theme by NeoEase | Valid XHTML 1.1 and CSS 3 Yukarı