Click here to Skip to main content
16,011,996 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a String in One Page and Send it to another page

First page i send the value in java script to open a radwindow like this:

var selectedItems ="ACQUISITION DIV/PROGRAM SUPPORT&CAPITAL PROJECTS";
var Field = "FundingOffice";
var oWnd = radopen("MultiSelectAwardee.aspx?id=" + selectedItems + "&Value=" + Field, "RadWindow14");

Second page i get the value like this:
selectedItems = Request.QueryString("id").ToString()

i get the string like this:after the & Symbol the string are missed:
selectedItems ="ACQUISITION DIV/PROGRAM SUPPORT"


How to solve this problem..Please anyone help me...
Posted

1 solution

You need to encode selectedItems because in the query string & represents a new field which is why you are losing the CAPTIAL PROJECTS.

Try this instead:
JavaScript
var selectedItems =encodeURIComponent("ACQUISITION DIV/PROGRAM SUPPORT&CAPITAL PROJECTS");
 
Share this answer
 
Comments
Boothalingam 5-Dec-13 22:48pm    
how to decode this encoded string from Code behind using VB.net
ZurdoDev 6-Dec-13 7:27am    
You can use Server.UrlDecode()
Boothalingam 5-Dec-13 23:00pm    
Thanku ....The problem has solved
Boothalingam 6-Dec-13 7:31am    
1.i'm having a sql table with millions of records
2.when i'm sending a sql query with where condition to the sql table thousands of records are getting(sql query can be changed simultaneously).
3.Now i want to send that record to excel sheet.
4.All the Above Steps can be done with the help of SSIS package in Visual Studio 2008
how to do the above steps programatically
ZurdoDev 6-Dec-13 7:45am    
You should open a new question to ask that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900