Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Passing values using Image button instead of 'Submit' button

Passing values using Image button instead of 'Submit' button

Scheduled Pinned Locked Moved ASP.NET
csharphelpjavacomquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    swissmiss86
    wrote on last edited by
    #1

    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

    N S 2 Replies Last reply
    0
    • S swissmiss86

      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

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      How are you submitting it? Are you handling the click event redirecting to the page?

      1 Reply Last reply
      0
      • S swissmiss86

        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

        S Offline
        S Offline
        swissmiss86
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups