dmhohf
Posts: 16
|
Posted: 12/25/2006, 8:24 PM |
|
I would like to pass two parameters in a URL using the "CCAddParam(QueryString, ParameterName, ParameterValue)" function. First is that possible? And second what would my syntax look like? Here is the code I've written so far, without the second parameter added.
(because I don't even know what it would look like)
Dim LastID
Dim LoginID
'Retrieve the last inserted key
LastID = CCDLookUp("max(ID)","tb_users","", DBocmUser)
'Retrieve the last inserted login, where ID = LastID
LoginID = CCDLookUp("LOGIN_ID","tb_users","ID = "& LastID &" ", DBocmUser)
'Append the last inserted key to the URL by modifying the 'Redirect' variable
redirect = FileName &"?"&CCAddParam(CCRemoveParam(Request.QueryString,"ccsForm"), "ID", LastID)
I can pass the "LastID" parameter, but not the "LoginID" parameter.
This is what I get: http://server.domain.local/default.asp?ID=8
This is what I'm trying to get: http://server.domain.local/default.asp?ID=8&LOGIN_ID=DMHOHF
Thanks guys. :)
|
|
|
dmhohf
Posts: 16
|
Posted: 12/28/2006, 12:54 PM |
|
Any ideas?
|
|
|
peterr
Posts: 5971
|
Posted: 12/28/2006, 1:04 PM |
|
Maybe you could try something like this:
Dim Par
Par = CCAddParam(CCRemoveParam(Request.QueryString,"ccsForm"), "ID", LastID)
Par = CCAddParam(Par, "LOGIN_ID", LoginID)
'Append the last inserted key to the URL by modifying the 'Redirect' variable
redirect = FileName &"?"& Par
(untested)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
dmhohf
Posts: 16
|
Posted: 12/28/2006, 1:05 PM |
|
Thanks Peterr, I'm gonna go try that.
|
|
|
dmhohf
Posts: 16
|
Posted: 12/28/2006, 6:07 PM |
|
It worked. :) Thanks again.
|
|
|
kamal
|
Posted: 02/26/2007, 4:34 AM |
|
Hi ,
I am trying to send two values through QueryString..But I can't get clear result
plz some one help me
string user_name="kamal";
string password="kamal";
Response.Redirect("WebForm2.aspx?"+"UserName=" + user_name +","+ "Password=" + password);
In the WebForm2 page
string username=Request.QueryString["UserName"];
string password=Request.QueryString["Password"];
But the Problem is I am getting Two Values in the first string(username="kamal,kamal")
|
|
|
|