Passing values using Image button instead of 'Submit' button
-
when you go to this page http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?ATR\_ExtraOne=Personal\_Wireless\_Plans\_Coverage and enter a zipcode and when u click the 'View coverage' image button, then you get the next page which shows whether you have coverage to the zipcode you entered. But i'm having problem when i do it through Csharp.Net. The problem is the zipcode value is not getting submitted through the image button. this is the final page where it displays whether it has coverage or not. http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?bmForm=SprintZipCodeToCSAComponentPlansFocus&bmFormID=1152889587027&bmUID=1152889587027&bmIsForm=true&bmPrevTemplate=explore%2Fcoverage%2FCoverageOverview.jsp&bmText=csaZip&csaZip=20171&bmImage=ShowPlans.x&bmImage=ShowPlans.y&bmImage=ReturnCSA.x&bmImage=ReturnCSA.y&bmHidden=FOLDER<>folder\_id&FOLDER<>folder\_id=1436777&bmHidden=CURRENT\_USER<>ATR\_SCID&CURRENT\_USER<>ATR\_SCID=ECOMM&bmHidden=CURRENT\_USER<>ATR\_PCode&CURRENT\_USER<>ATR\_PCode=None&bmHidden=CURRENT\_USER<>ATR\_cartState&CURRENT\_USER<>ATR\_cartState=group&bmFields=bmForm%2CbmFormID%2CbmUID%2CbmIsForm%2CbmPrevTemplate%2CbmText%2CbmImage%2CbmHidden&bmHash=84312c83205bfccaa4a01a0f0edbd2d4495bbd27&ReturnCSA.x=36&ReturnCSA.y=7 any help would be appreciated
-
when you go to this page http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?ATR\_ExtraOne=Personal\_Wireless\_Plans\_Coverage and enter a zipcode and when u click the 'View coverage' image button, then you get the next page which shows whether you have coverage to the zipcode you entered. But i'm having problem when i do it through Csharp.Net. The problem is the zipcode value is not getting submitted through the image button. this is the final page where it displays whether it has coverage or not. http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?bmForm=SprintZipCodeToCSAComponentPlansFocus&bmFormID=1152889587027&bmUID=1152889587027&bmIsForm=true&bmPrevTemplate=explore%2Fcoverage%2FCoverageOverview.jsp&bmText=csaZip&csaZip=20171&bmImage=ShowPlans.x&bmImage=ShowPlans.y&bmImage=ReturnCSA.x&bmImage=ReturnCSA.y&bmHidden=FOLDER<>folder\_id&FOLDER<>folder\_id=1436777&bmHidden=CURRENT\_USER<>ATR\_SCID&CURRENT\_USER<>ATR\_SCID=ECOMM&bmHidden=CURRENT\_USER<>ATR\_PCode&CURRENT\_USER<>ATR\_PCode=None&bmHidden=CURRENT\_USER<>ATR\_cartState&CURRENT\_USER<>ATR\_cartState=group&bmFields=bmForm%2CbmFormID%2CbmUID%2CbmIsForm%2CbmPrevTemplate%2CbmText%2CbmImage%2CbmHidden&bmHash=84312c83205bfccaa4a01a0f0edbd2d4495bbd27&ReturnCSA.x=36&ReturnCSA.y=7 any help would be appreciated
How are you submitting it? Are you handling the click event redirecting to the page?
-
when you go to this page http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?ATR\_ExtraOne=Personal\_Wireless\_Plans\_Coverage and enter a zipcode and when u click the 'View coverage' image button, then you get the next page which shows whether you have coverage to the zipcode you entered. But i'm having problem when i do it through Csharp.Net. The problem is the zipcode value is not getting submitted through the image button. this is the final page where it displays whether it has coverage or not. http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?bmForm=SprintZipCodeToCSAComponentPlansFocus&bmFormID=1152889587027&bmUID=1152889587027&bmIsForm=true&bmPrevTemplate=explore%2Fcoverage%2FCoverageOverview.jsp&bmText=csaZip&csaZip=20171&bmImage=ShowPlans.x&bmImage=ShowPlans.y&bmImage=ReturnCSA.x&bmImage=ReturnCSA.y&bmHidden=FOLDER<>folder\_id&FOLDER<>folder\_id=1436777&bmHidden=CURRENT\_USER<>ATR\_SCID&CURRENT\_USER<>ATR\_SCID=ECOMM&bmHidden=CURRENT\_USER<>ATR\_PCode&CURRENT\_USER<>ATR\_PCode=None&bmHidden=CURRENT\_USER<>ATR\_cartState&CURRENT\_USER<>ATR\_cartState=group&bmFields=bmForm%2CbmFormID%2CbmUID%2CbmIsForm%2CbmPrevTemplate%2CbmText%2CbmImage%2CbmHidden&bmHash=84312c83205bfccaa4a01a0f0edbd2d4495bbd27&ReturnCSA.x=36&ReturnCSA.y=7 any help would be appreciated
In the Page_Load i'm calling the PostFormData() by passing URL as a parameter. Code here is lblTest.Text = PostFormData("","http://www1.sprintpcs.com/explore/coverage/CoverageOverview.jsp?bmForm=SprintZipCodeToCSAComponentPlansFocus&bmFormID=1152824111731&bmUID=1152824111731&bmIsForm=true&bmPrevTemplate=explore%2Fcoverage%2FCoverageOverview.jsp&bmText=csaZip&csaZip=20171&bmImage=ShowPlans.x&bmImage=ShowPlans.y&bmImage=ReturnCSA.x&bmImage=ReturnCSA.y&bmHidden=FOLDER<>folder\_id&FOLDER<>folder\_id=1436777&bmHidden=CURRENT\_USER<>ATR\_SCID&CURRENT\_USER<>ATR\_SCID=ECOMM&bmHidden=CURRENT\_USER<>ATR\_PCode&CURRENT\_USER<>ATR\_PCode=None&bmHidden=CURRENT\_USER<>ATR\_cartState&CURRENT\_USER<>ATR\_cartState=group&bmFields=bmForm%2CbmFormID%2CbmUID%2CbmIsForm%2CbmPrevTemplate%2CbmText%2CbmImage%2CbmHidden&bmHash=0b24f83f9aeb3e1e8e99ca2ae0d7a53e4b5637ed&ReturnCSA.x=33&ReturnCSA.y=9"); and code for PostFormData is here private string PostFormData(string strFormData,string strPostURL) { try { bytData = Encoding.ASCII.GetBytes(strFormData); myWebReq = (HttpWebRequest)WebRequest.Create (strPostURL); myWebReq.Method = "POST"; myWebReq.KeepAlive = false; myWebReq.ContentType = "application/x-www-form- urlencoded"; myWebReq.ContentLength = bytData.Length; reqStream = myWebReq.GetRequestStream(); reqStream.Write(bytData, 0, bytData.Length); reqStream.Close(); HttpWebResponse myWebRspns = (HttpWebResponse) myWebReq.GetResponse(); srResult = new StreamReader(myWebRspns.GetResponseStream (), System.Text.Encoding.ASCII); strResponse = srResult.ReadToEnd(); srResult.Close(); return strResponse; } I don't know where i'm going wrong. Pls help