DUYURULAR
Yeni eklenen ve/veya güncellenen sayfaları görmek için buraya tıklayınız.
Güncel ödev ve test listesini görmek için buraya tıklayınız.
Sitede yapılan iyileştirmeAer ve hata düzeltmelerine ait tüm bilgilendirmeleri görmek içinburaya tıklayınız.
asynclerin çalışması aspx sayfasına Async = "true" yazdım.
Ön bilgiler redirect, postbaculr v.s: Bunalr ilgili sayfaya doğrudan gidiyor, oradaki page_load tetikleniyor.Excelde biw workbooktan bilgi okumak için onu açmak gibi httpclient : sayfalara gitmeden, onları açamadna, excelde ADO ile okumak gişbi, o sayfaya gidliseydi ne mesaj dönerdi'yi sana döndrüyüor. VBA ile yapacğaımız şey aslında bir nevi httpclient gibi bir api kullanmak olacak. vba'in apisi xmlhtp2 ve winhttp iken .net dünyasında httpclient v.s
REDIRECT, SERVER.TRASNFER V.S //ASP.NET buttons always perform a POST. You can set which page the button posts to using the PostBackUrl property of the button.If you leave this blank, the button will post back to the same page that is resides on //https://www.codeproject.com/Articles/775221/Server-Transfer-VS-Response-Redirect-Simplified //clikcck eventien yazılacak kodlarla postbackrul farkı //The main difference between them is who does the transfer. In “response.redirect”, the transfer is done by the browser while in “server.transfer”, it’s done by the server. //PostBackURL is more equivalent to Server.Transfer than Response.Redirect. //It maintains ViewState and all the rest of the Page object and other State Bags. //Response.Redirect simply sends a 302 to the browser.(URL redirection) //Also, PostBackURL simply sets a CLIENT-SIDE script event on a button.So it doesn't work in all situations. Server.Transfer stays on the server. //But in case of Response.Redirect the values of all the controls of the page gets deleted and at next page the values cannot be read.The way to transfer the values from the one page to next page is either using state management or using Querystring. //redi.rect ile başka siteye de yöllendirisin.Ör: google.çcom, ama server..trasnfer ile aynı serverda kalman lazım, doalyısyla aspx olmalı, redicrt ile html de açarsın //One advantage of redirect with querystring(if you see it as such) is that the user can f5 to refresh, and they can also bookmark, or send the url on to other people and when they look at the url later the page will be set up for the same parameters.If you use postbacks and look at a page that you have set to show items from a category dictated by a dropdown, then when you revisit that url you'll see the standard unfiltered page. If you do a redirect to "page.aspx?category=mycat" then when you go back to that url it is always looking at "mycat" //Response.Redirect leads to HTTP 302 Redirect.It is the common redirect action unlike 301 redirect which is used when you want to change the url completely and permanently. // Server.Transfer in fact does not activates any HTTP requests and completely transparent to user.Usually it is used to show error pages (e.g. 404 or 500 HTTP statuses), because if you will use redirect instead of Server.Transfer, browser(more important if it's a search engine crawler) will not receive original HTTP status (404 for example). Server.Transfer metodu tarayıcının bir sayfaya yönlendirilmesi sırasında tarayıcıdaki URL adresinde bir değişiklik yapmaz.Dolayısıyla bu metodu kullanmak QueryString'in URL'de görünmemesini sağlar.The Response.Redirect method redirects a request to a new URL and specifies the new URL while the Server.Transfer method for the current request, terminates execution of the current page and starts execution of a new page using the specified URL path of the page.When you use Server.Transfer then the previous page also exists in server memory while in the Response.Redirect method the previous page is removed from server memory and loads a new page in memory.Geri gitme işe yaramaz mı?
When Server.Execute is used, a URL is passed to it as a parameter and the control moves to this new page.Execution of code happens on the new page.Once code execution gets over, the control returns to the initial page, just after where it was called.However, in the case of Server.Transfer, it works very much the same, the difference being the execution stops at the new page itself(means the control isn't returned to the calling page). In both the cases, the URL in the browser remains the first page URL (doesn't refresh to the new page URL) as the browser isn't requested to do so. //Sanki redirect daha çok GET mesja(evet aynen böyleymiş)ı, serv.transer(postbakurl) de POST mesjaı aamaçlı kullanılmalı.sadece postlu yönlendrime yapcaksan postbakurl yeterli, başka kod da yazacaksan click eventinde server.transfer.server.trasnferin ikicni paramtersi false olursa GET gibi oluyor galiba. */ /*HTTP Client v.s https://stackoverflow.com/questions/4015324/how-to-make-an-http-post-web-request https://www.infoworld.com/article/3198673/when-to-use-webclient-vs-httpclient-vs-httpwebrequest.html HttpClient is preferred over HttpWebRequest due to async methods available out of the box and you would not have to worry about writing begin/end methods. HttpWebRequest ile yde ypaılabiliyormuş ama artık öernilimiyor, Webcilent ile yde ypaılabiliyormuş ama artık öernilimiyor In a nutshell, WebRequest—in its HTTP-specific implementation, HttpWebRequest—represents the original way to consume HTTP requests in .NET Framework. WebClient provides a simple but limited wrapper around HttpWebRequest. And HttpClient is the new and improved way of doing HTTP requests and posts, having arrived with .NET Framework 4.5. WebRequest w; //system.net, ilk çıkan buydu. abstract sınıf. bu her reuest için connecitonı yeniden kurar, httpclient o yüzden daha iyi HttpWebRequest hw; //system.net, üsttekinin torunu, aynı zamanda non-abstarct hali sanırım WebClient ww; en basiti bu, arkaplanda webreuest ve webresponse kullanıyor, yani bunlar için bi wrapper HttpClient ht; //system.net.http, In essence, HttpClient combines the flexibility of HttpWebRequest and the simplicity of WebClient, giving you the best of both the worlds.However, you should be aware that HttpClient was never designed to be a replacement for WebClient. You should use HttpWebRequest instead of HttpClient whenever you need the additional features that HttpWebRequest provides. ----- var request = (HttpWebRequest) WebRequest.Create("http://www.google.com"); Why do you need to cast (HttpWebRequest)? Why not just use HttpWebRequest.Create? And why does HttpWebRequest.Create make a WebRequest, not a HttpWebRequest? cevap:The Create method is static, and exists only on WebRequest. Calling it as HttpWebRequest.Create might look different, but its actually compiled down to calling WebRequest.Create. It only appears to be on HttpWebRequest because of inheritance. The cast is only necessary when you need access to members unique to HttpWebRequest. The idea is that if the properties/methods supported on WebRequest are sufficient, then you can write an application that will work against many types of request/response protocols. In this case the URI could be something given by the user using any protocol supported by pluggable protocols. New protocols can even be supported without altering the original software.
Her iki gruptaki düğmeler için de REFRESH yapmaya unutma, etkisini görelim(sonra bunu sil, etkileri kod açıklamasına gir)
aynı sayafa sonucu görme işini nasıl yapalım. response.irte mı, context.... mi? server.trasnfer, false ile mi? Masterpagesiz düz bi sayfada daha iyi görünür gibi. Bu neden gerekli olsun ki? aynı sayfada yazdırmanın anlamı ne?
header ve body oalylarıan da bak. httpclient v.s ile kolaydır da, diğer yöntemlerle nasıl yapcaz? ve bunalr nedne önemli olsun, nedne headerdan bişi okuyalım?
URL:
PTSV2.COM : show linkine tıkalrsan config açıyor, POST metodu için auth bilgileri dahil bikaç şey gireibliiyusoun
http://ptsv2.com/t/trump/post
http://ptsv2.com/t/trump/d/1: GET, bunun jsonı: http://ptsv2.com/t/trump/d/1/json , http://ptsv2.com/t/trump/d/1/text
http://ptsv2.com/t/trump/d/20001: POST, http://ptsv2.com/t/trump/d/20001/json, http://ptsv2.com/t/trump/d/20001/text
http://ptsv2.com/t/trump/d/6137950869913600 : bunu ben yaptım, GET, http://ptsv2.com/t/trump/d/6137950869913600/json
#benim yaptığım ise otorizeli, volki ve tolki http://ptsv2.com/t/volkitolki/post http://ptsv2.com/t/volkitolki/d/4891978374316032: GET (trumptakinnin aksine ben aşağıda POST olşuturamadım)
Diğer örnek linkler
https://httpbin.org
https://httpbin.org/get
https://www.google.com/search?q=excel&oq=excel&aqs=chrome..69i57j35i39l2j0i433l4j46i433l2j0.839j0j15&sourceid=chrome&ie=UTF-8 http://ptsv2.com/t/1pe11-1616792757/post
Herkese merhaba. Hosting maliyetlerinin aşırı artması yüzünden sitemi yakın zamanda(en geç Mayıs 2023) kapatmaya karar vermiştim. Ancak, siteyi yakından takip eden bir arkadaş siteyi devralmak istemiştir. Siteyi, Mayıs ayında kendisine devir etmeye karar verdim. Üyelik bilgilerini bana güvenerek girdiğiniz için, hepsini silmiş bulunuyorum, yani mail adreslerinizi kimseyle paylaşmamış olacağım. Bilginizi rica ederim.