Click here to Skip to main content
15,912,329 members

Comments by Aneesh M (Top 3 by date)

Aneesh M 24-Dec-11 9:05am View    
in this program i am passing parameters are below
Input
MetaKey
PageData
WidgetList
Aneesh M 24-Dec-11 9:02am View    
Deleted
thank you for replay

current my programs like this

private static string extraParsal(String requestUrl,bool status)
{

string resultHTML = string.Empty, action = string.Empty;
StringBuilder resultdata = new StringBuilder();
ASCIIEncoding objEncoding = new ASCIIEncoding();
Stream reqStream = null;
HttpWebResponse objResponse = null;
StreamReader objReader = null;
try
{

HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(requestUrl);
objRequest.CookieContainer = fristcookie;

if (status)
{
resultdata.Remove(0, resultdata.Length);

resultdata.Append("Input=pg=2&curWSC=WSC");

resultdata.Append("&MetaKey=srp");

resultdata.Append("&PageData=suffix=&baseurl=realestateandhomes-search&status=homes+for+sale&zip=50023&city=ANKENY&state=IA&statename=Iowa&type=single-family-home%3Bcondo-townhome-row-home-co-op%3Bmfd-mobile-home&listingType=single-family-home%3Bcondo-townhome-row-home-co-op%3Bmfd-mobile-home&nl=last14days&sby=2&sortby=2&userlocation=Ankeny%2CIA%2C50023&MetaKey=srp&seo_loc=Zip&PageTitle=50023+Real+Estate+-+ANKENY%2C+IA+50023+Homes+for+Sale+-+Realtor.com%26reg%3B+&PageH1=50023+Real+Estate+and+Homes+for+Sale&baseHost=&mapConstructor=vemap&_rdcLibUrl=http%3A%2F%2Fstatic.move.com%2Flib%2Frdc%2F6.0.19%2F&svertical=rdc&pg=2");
resultdata.Append("&WidgetList=[{\"ID\": \"currentProperty\", \"Param\": \"extras=status&ajax=0&DataAdapterKey=dat&WidgetRelative=%2FcurrentProperty\", \"Widget\": \"currentProperty\", \"WidgetRelative\": \"/currentProperty\", \"ctxt\": \"\", \"extraLoad\": null}, {\"ID\": \"oldSRP\", \"Param\": \"ajax=0&listingTypeDefault1=single-family-home&listingTypeDefault2=condo-townhome-row-home-co-op&listingTypeDefault3=mfd-mobile-home&statusDefault=sale&sortbyDefault=2&OmnitureUpdate=1&geo_server=geo.svc.move.com&showCustoimzeIndicator=1&srpFadeOutRate=0.5&listingDataSource=oldSRPHeader&DataAdapterKey=dat&ArgAdapterKey=argSRP&cookieName4RecentViewed=RecentViewed&cookieName4RecentSearch=RecentSearch&pageStatus=SRPWidget%7ColdSRP%7ColdSRPHeader&defaultSRPTab=oldSRPTab&statusWidget=oldFacetSearch&FacetLimit=20&extras=mlslid%7Cpfbm%7Ccity%7Cstate&WidgetRelative=%2FoldSRP\", \"Widget\": \"oldSRP\", \"WidgetRelative\": \"/oldSRP\", \"ctxt\": \"\", \"extraLoad\": null}]\"");

resultdata.Append("&debug=0");
resultdata.Append("&format=jsonp");
}

objRequest.KeepAlive = true;
objRequest.Method = "POST";
byte[] objBytes = objEncoding.GetBytes(resultdata.ToString());
objRequest.ContentLength = objBytes.Length;
objRequest.ContentType = "application/x-www-form-urlencoded";
reqStream = objRequest.GetRequestStream();
reqStream.Write(objBytes, 0, objBytes.Length);


objResponse = (HttpWebResponse)objRequest.GetResponse();
objReader = new StreamReader(objResponse.GetResponseStream());
resultHTML = objReader.ReadToEnd();

foreach (Cookie cookie in objResponse.Cookies)
{
//if (cookie.Name.Trim() == "criteria")
//{
// string sid = cookie.Value.Trim();//"pg=2&"+
// fristcookie.Add(new Cookie(cookie.Name.Trim(), sid , cookie.Path, cookie.Domain));
//}

fristcookie.Add(new Cookie(cookie.Name.Trim(), cookie.Value.Trim(), cookie.Path, cookie.Domain));
}

Aneesh M 24-Dec-11 5:20am View    
now i am using post method i am also passing cookie to that post request my problem is i don't know how to pass other paramter. currently this web site using ajax for loading data this is called when textbox change event occur.
after analysis request using firebug i got this parameters i don't know how to pass this parameter to web request. i think the paramter WidgetList is a json