Request Değerlerini ekrana yazdırmak
Request nesnesinde Querystringle gonderilmis degerleri adres satirinda yakalamk her zaman kolay degildir. Bu degerleri ekranda gorerek olasi bir hatayi tespit etmek icin kullanilacak basit bir kod;
int i,k;
NameValueCollection collSet = Request.QueryString;
string[] arr1 = collSet.AllKeys;for (i = 0; i < arr1.Length; i++)
{
Response.Write("Key : " + Server.HtmlEncode(arr1[i]) + "<br>");
String[] arr2 = collSet.GetValues(arr1[i]);
for (k = 0; k < arr2.Length; k++)
{
Response.Write("Value:" + Server.HtmlEncode(arr2[k]) +"<br>");
}
}
Comments (0)
Trackbacks (0)
Leave a comment
Trackback