|
[Jun. 6th, 2006|02:45 pm] |
Nu tad taa, taa kaa mans daargais pazinja maasters Inx chinkst, ka man vajadzeetu puksteet cibaa, tad nu luuk, shis ir prieksh tevis Inx:
taatad ja nu kaadreiz sagribas no datu baazes pa taisno izlaadeet bildi un nopubliceet kaadaa web lapaa, tad nu veido fiktiivu lapu un aiziet.
int bannerId = Int32.Parse(Request.QueryString["id"]);
LogicLayer.Banner_FromDatabase banner = LogicLayer.Banner_FromDatabase.BannerGetById(bannerId); //getsbanner data from database
//converts stream to byte masive
MemoryStream stream = new MemoryStream(banner.ImageByte);
//converts byte masive to System.Drawing.Image System.Drawing.Image image2 = System.Drawing.Image.FromStream(stream);
int lenght = banner.ImageName.Length; int i = 0; while (i == 0) { if (banner.ImageName[--lenght].ToString() == ".") { banner.ImageName = banner.ImageName.Substring(lenght); break; } }
//sending image with right format throught stream if (banner.ImageName == ".image/pjpeg" || banner.ImageName == ".pjpeg") { Response.ContentType = "image/jpg"; image2.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg); }
if (banner.ImageName == ".image/gif" || banner.ImageName == ".gif") { Response.ContentType = "image/gif"; image2.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif); } image2.Dispose(); Response.End();
p.s. lol ceru, ka patika, gan jau sanjemshos veel ko ierakstiit |
|
|
Comments: |
From: | inx |
Date: | June 6th, 2006 - 03:05 pm |
---|
| | | (Link) |
|
tad nu beidzot!
bet man nav ne jausmas, par ko tu raksti...
From: | zive_ |
Date: | June 6th, 2006 - 03:12 pm |
---|
| | | (Link) |
|
ha ha ha
From: | inx |
Date: | June 6th, 2006 - 03:58 pm |
---|
| | | (Link) |
|
tu esi loceklis!
From: | zive_ |
Date: | June 6th, 2006 - 04:53 pm |
---|
| | | (Link) |
|
Vismaz es esmu liels loceklis!
From: | (Anonymous) |
Date: | June 7th, 2006 - 10:05 pm |
---|
| | Kamazs | (Link) |
|
Google is our friend:P.
Ha ha ha! Par ko pukst Zive, kas nomāc viņa sirdi un prātu. Vēl ģeniālāk būtu, ja tu to tiešām būtu rūpīgi un kārtīgi iedrukājis, nevis kopīpeistojis no kaut kurienes, kā tas, visticamāk arī bija.
From: | zive_ |
Date: | June 11th, 2006 - 02:45 am |
---|
| | | (Link) |
|
Nu tas noteikti buutu gjeniaalaak, ja es savu kodu paarrakstiitu nevis "kopīpeistojis"!
Tu redzeeji cik tur daudz simboli!?
Tu redzeeji cik daudz simbolus es pa dienu uzrakstu? | |