CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Add two parameters in redirect function?

Print topic Send  topic

Author Message
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. :)
View profile  Send private message
dmhohf

Posts: 16
Posted: 12/28/2006, 12:54 PM

Any ideas?
View profile  Send private message
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
View profile  Send private message
dmhohf

Posts: 16
Posted: 12/28/2006, 1:05 PM

Thanks Peterr, I'm gonna go try that.
View profile  Send private message
dmhohf

Posts: 16
Posted: 12/28/2006, 6:07 PM

It worked. :) Thanks again.
View profile  Send private message
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")

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.