Get text and put it into asp code

Results 1 to 2 of 2

Thread: Get text and put it into asp code

  1. #1
    Charlih Chen Guest

    Default Get text and put it into asp code

    Dear ALL:<BR> I have encounter the following problem.<BR>All I try to do is to get filename.asp?name1=content1&name2=content2<BR>and put name1, name2 and content1, content2 into recordset as following format.<BR><BR>&#039; URL parameters Parse <BR>QueryString = Request.ServerVariables("QUERY_STRING")<BR>ParamLi st = Split( QueryString, "&" )<BR><BR>recordset.AddNew<BR><BR>For I = 0 To UBound(ParamList)-1<BR>Param = Split(ParamList(I), "=")<BR><BR>recordset("Param(0)") = "Param(1)"<BR>&#039; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^<BR>&#039; Problem is as above. How to make it work?<BR><BR>Next<BR><BR>recordset.Update

  2. #2
    Join Date
    Dec 1969

    Default RE: Get text and put it into asp code

    I have bever seen that done but at the least you need to remove the double quotes but even then all you will get are it will not work because at best you would get <BR><BR>0 = name1<BR>1 = content1&name2<BR>3 = content2<BR><BR>I am not sure if name1 and name2 are variables along with content1 and content2 if then then do this<BR>filename.asp?name1=&#060;%=content1%&#062; &name2=&#060;%=content2%&#062;<BR><BR>else do<BR><BR>filename.asp?vals=&#060;%=name1 & "," & content1 & "," & name2 & "," & content2%&#062; <BR><BR>ParamList = Split(Request.QueryString("vals"), ",")<BR><BR><BR>Sql="Insert Into TableName (&#039;" & ParamList(0) & "&#039;, &#039;" & ParamList(2) & "&#039;) Value (&#039;" & ParamList(1) & "&#039;, &#039;" & ParamList(3) & "&#039;);"<BR><BR>YourDBConnection.Execute Sql<BR><BR>that should work <BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts