Last post Mar 21, 2020 02:47 AM by KathyW
Mar 20, 2020 10:21 PM|SmokinJoe|LINK
I have the following string that I am sending to another page to fill-in the appropriate values for each of the named segments.
Response.Redirect("Page__Detail_Input_1.aspx?ErrorLabel=" + MsgText1 & "HealthCond=" + HealthIn & "Fever=" + ddlFeverText & "Country=" + ddlCountryText & "Cough=" + ddlCoughText & "Breath=" + ddlBreathText & "")
In VB.Net how do I parse each of the component parts, e.g. HealthCondition, Fever, Country... etc. to populate either a TextBox or a Label? I have tried using <%Response.Write(Request.QueryString("ErrorLabel"))%>'> it displays all the data, but I cannot parse
Mar 21, 2020 12:33 AM|KathyW|LINK
Request.QueryString("ErrorLabel") will get the value for the querystring parameter "ErrorLabel", Request.QueryString("HealthCond") will get the value for the querystring parameter "HealthCond", and so on. If it returns anything more than that, check what
value you are actually sending in the Redirect address. Your creation of the string for the Redirect looks wrong, where you are not quoting the ampersands and appending them to the string with a +.
Response.Redirect("Page__Detail_Input_1.aspx?ErrorLabel=" + MsgText1 + "&HealthCond=" + HealthIn + "&Fever=" + ddlFeverText + "&Country=" + ddlCountryText + "&Cough=" + ddlCoughText + "&Breath=" + ddlBreathText)
Mar 21, 2020 01:19 AM|SmokinJoe|LINK
I've retired and been away from this for over 6 years. With all that's going on I needed to find something to keep me occupied, so I'm re-working some of my old programs and reinventing them for new uses...I'm rusty but its coming back slowly! Thank you
for your help!
Mar 21, 2020 02:47 AM|KathyW|LINK
You're welcome. Have fun!