pass value through url in Http library

junaidahmed

Well-Known Member
Licensed User
Longtime User
I was trying to pass value through url from php script and http library in basic4android it works fine,but when i pass values with space it shows an error like

"java.lang.IllegalArgumentException"

my code is give below

StrDate = TxtDate .Text
StrDesc = TxtNarr.Text
StrHead = CboHead.SelectedItem
StrAmount = TxtAmount.Text
StrType = CboType.SelectedItem
StrRemarks = "TestforEnrry"

URL = "http://kharind.com/experiment/insert.php?TrNo=7&TrDate="&StrDate&"&TrDesc="&StrDesc&"&TrACode="&StrHead&"&TrAmount="&StrAmount&"&TrType="&StrType&"&TrRemarks="&StrRemarks&""

it works fine when no space between values,

my value is to pass StrDesc is "Testforvalue" --------> works fine
"Test for value" -------->through exception error java.lang.IllegalArgumentException

pls advise where it is problem.
 

moster67

Expert
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…