Пример URL-адреса запроса: http:\\localhost\ChatWindow.aspx?username=sly_chandan
Мой веб-метод указан ниже:
[WebMethod(EnableSession = true)]
public static List<PrivateMessage> GetMessages()
{
List<PrivateMessage> getMsgsList = (List<PrivateMessage>)HttpContext.Current.Application["PrivateMessages"];
var msgs = getMsgsList.Where(x => x.fromUsername == HttpContext.Current.Session["Username"].ToString() && x.toUsername == HttpContext.Current.Request.QueryString["username"]);
return msgs.ToList();
}
Мне не удается получить параметр строки запроса.