{"id":47,"date":"2009-02-20T11:06:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=47"},"modified":"2009-02-20T11:06:00","modified_gmt":"1970-01-01T00:00:00","slug":"update-panel-icinde-file-upload-dosya-yukleyeme-kullanimi","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2009\/02\/20\/update-panel-icinde-file-upload-dosya-yukleyeme-kullanimi\/","title":{"rendered":"Update Panel i\u00e7inde File Upload (Dosya Y\u00fckleyeme) Kullanimi"},"content":{"rendered":"<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><strong style=\"\"><span style=\"font-size: small;\"><span style=\"font-family: Calibri;\">Update Panel i&ccedil;inde File Upload (Dosya Y&uuml;kleyeme) Kullanimi<\/span><\/span><\/strong><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Bir sayfaniz var ve i&ccedil;inde bir ya da daha fazla update panel kullaniyorsunuz. Ayrica bu sayfa i&ccedil;inde bir de file upload kontrol&uuml;ne ihtiyaciniz var. Bu durumda hen&uuml;z ilk denemenizde olasi hatayla karsilasacaksiniz demektir. Yani file upload kontrol&uuml; bir dosya i&ccedil;ermiyor olacak ve b&ouml;ylece y&uuml;klemeyi yapamayacaksiniz. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Bu sorunla ilgili ufak bir arastirmayla beraber &ccedil;ok fazla kaynaga ulasabilirsiniz. Ve &ccedil;ogunun s&ouml;yledigi, bu sorunun &ccedil;&ouml;z&uuml;m&uuml;n&uuml;n ufak bir eklenti oldugudur. Asagida oldugu gibi, update panelin triggerlarina <strong style=\"\">PostBackTrigger<\/strong> olarak upload i&ccedil;in kullanilacak butonu g&ouml;stermeniz yeterli olacaktir:<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">UpdatePanel<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;upnl&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">ContentTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">FileUpload<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;fup&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: blue;\">\/&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Button<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;btnUpload&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Text<\/span><span style=\"color: blue;\">=&quot;Y&uuml;kle&quot;<\/span> <span style=\"color: blue;\">\/&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">ContentTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">Triggers<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">PostBackTrigger<\/span> <span style=\"color: red;\">ControlID<\/span><span style=\"color: blue;\">=&quot;btnUpload&quot;<\/span> <span style=\"color: blue;\">\/&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">Triggers<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">UpdatePanel<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Bu sekilde kullanacaginiz file upload gayet d&uuml;zg&uuml;n &ccedil;alisacak ve sorununuz &ccedil;&ouml;z&uuml;lm&uuml;s olacaktir. Peki ya bu update panel i&ccedil;erisinde postback yapacak baska bir kontrol&uuml;m&uuml;z olursa?<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">UpdatePanel<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;upnl&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">ContentTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">DropDownList<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;ddl&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">AutoPostBack<\/span><span style=\"color: blue;\">=&quot;true&quot;<\/span> <span style=\"color: red;\">OnSelectedIndexChanged<\/span><span style=\"color: blue;\">=&quot;ddl_SelectedIndexChanged&quot;&gt;&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">DropDownList<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">FileUpload<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;fup&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: blue;\">\/&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">Button<\/span> <span style=\"color: red;\">ID<\/span><span style=\"color: blue;\">=&quot;btnUpload&quot;<\/span> <span style=\"color: red;\">runat<\/span><span style=\"color: blue;\">=&quot;server&quot;<\/span> <span style=\"color: red;\">Text<\/span><span style=\"color: blue;\">=&quot;Y&uuml;kle&quot;<\/span> <span style=\"color: blue;\">\/&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">ContentTemplate<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">Triggers<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">PostBackTrigger<\/span> <span style=\"color: red;\">ControlID<\/span><span style=\"color: blue;\">=&quot;btnUpload&quot;<\/span> <span style=\"color: blue;\">\/&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">Triggers<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">asp<\/span><span style=\"color: blue;\">:<\/span><span style=\"color: rgb(163, 21, 21);\">UpdatePanel<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt; text-indent: 35.4pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">Bu durumda trigger &ccedil;&ouml;z&uuml;m&uuml; ise yaramayacak ve basa d&ouml;nm&uuml;s olacaksiniz. Bunu asabilmek i&ccedil;in ilk akla gelen yol postback yapacak kontrol ile file upload kontrol&uuml;n&uuml; farkli update paneller i&ccedil;ine almaktir. Peki, bu sefer de tasariminiz buna izin vermezse ne yapacaksiniz? Bir popup kontrol&uuml; kullanarak sorunuzu &ccedil;&ouml;zebilir ve tasarim kisitlamasina takilmis olmazsiniz. Ayrica bir ajax popup ile sayfa tasariminizi bozmayacak hatta daha kullanisli ve sik bir y&ouml;nteme ulasabilirsiniz.<\/span><\/p>","protected":false},"excerpt":{"rendered":"<p>Bir sayfaniz var ve i&#231;inde bir ya da daha fazla update panel kullaniyorsunuz. Ayrica bu sayfa i&#231;inde bir de file upload kontrol&#252;ne ihtiyaciniz var. Bu durumda hen&#252;z ilk denemenizde olasi hatayla karsilasacaksiniz demektir. Yani file upload kontrol&#252; bir dosya i&#231;ermiyor olacak ve b&#246;ylece y&#252;klemeyi &#8230;<\/p>\n","protected":false},"author":538,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[409],"tags":[4224,4229,6279,5800,6119,5613,6007,5259,5002,6225],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/47"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/538"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}