Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2005, 03:42 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default Querystring in ASP.NET

Hi,

I am using a form with server side controls and redirecting the results to another page. I used the sessions on the code behind and it is not getting in that redirected page. So I tried the querystring to pass the variables to that page. But it is terminating at the "&" when I am adding the second value to the querystring and displaying error.

Please help me on these things: How to pass the session variable from the code behind or Querystring Immediately.

SK
__________________
Thanks in advance.

Regards,

Senthil Kumar M.
 
Old February 23rd, 2005, 04:34 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Is the querystring value has apostrophe character?

 
Old March 1st, 2005, 08:58 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default

No. I am not using the special characters but I solved the problem.

SK
 
Old March 1st, 2005, 12:14 PM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 Posts
Default

So what is the solution? Please share with us so we can all learn.

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Jim's Book of the week: Beginning Regular Expressions
 
Old March 2nd, 2005, 02:26 AM
Authorized User
 
Join Date: Dec 2004
Posts: 69
Thanks: 0
Thanked 5 Times in 5 Posts
Send a message via Yahoo to whiterainbow
Default

I assigned all the variables to a common variable along with some common strings through which i can split the variables at the request page.

It will look like this:

dim comvbl = vbl1 &"$"& vbl2 &"$"& vbl3

Here the variables are the data which we are going to pass to the next page.

I passed the comvbl as the qrystring means

response.redirect("URL?comvbl="&comvbl)

In the resultant page I use the split command to split the variables and assigning it to the private variable of that page:

data = Split(Request("comvbl"),"$")

pvbl1=data(0)
pvbl2=data(1)
pvbl3=data(2)

From here we can use the data and if we want to pass the data to some other page using the querystring method, we can follow the already given way.


If there is problems still, use the session and get the variables there in the resultant page.

Thank You.

SK





Similar Threads
Thread Thread Starter Forum Replies Last Post
go to the querystring in VB.NET bhavna VS.NET 2002/2003 0 January 16th, 2007 01:39 AM
ASP QueryString ... dzagore2 Classic ASP Basics 5 May 7th, 2006 06:21 PM
Problem with QueryString in ASP s.abraham ASP.NET 1.0 and 1.1 Basics 1 March 22nd, 2005 04:43 PM
cant make a link with Querystring in ASP zakarya_hazara Classic ASP Basics 6 October 10th, 2004 01:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.