473,326 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Querystring Parameter value truncated when passed to other .aspx p

What I'm trying to do is when a hyperlink is clicked pass a value that looks
like \\Blah\blah\Blah to another .aspx page via a querystring. But what the
other page receives is \BlahblahBlah. I tried using server.urlencode but I
can't seem to get it to work. PLEASE HELP! Here's what code below...

NavigateUrl='<%# "javascript:var PopUpWin =
window.open(""deletefiles.aspx?unc_path=" &
DataBinder.Eval(Container.DataItem,"unc_path") & "&username=" &
DataBinder.Eval(Container.DataItem, "username") &
""","""",""status=no,location=no,resizable=yes,wid th=400,height=150"")" %> '
ID="Hyperlink1"/>

Nov 18 '05 #1
2 3047
Do you have to do all this in javascript? I'd probably:

a. Create a LinkButton (in each row of what I presume is a datagrid)
b. Trap ItemCommand
c. Within ItemCommand, go find the control, get the values to build your
query string, and redirect to that page (although you'll get a menu bar on
the new window).
d. On ItemDataBound, attach javascript to prompt for delete confirmation
behind each button.

Or, you can create a public function on the page to escape your string for
javascript and return the clean version to your databinder.eval.

Or, you can probably make the syntax below work...try alternating the single
and double quotes and cutting out some of the double doubles.

hth,

Bill

"u_heet" wrote:
What I'm trying to do is when a hyperlink is clicked pass a value that looks
like \\Blah\blah\Blah to another .aspx page via a querystring. But what the
other page receives is \BlahblahBlah. I tried using server.urlencode but I
can't seem to get it to work. PLEASE HELP! Here's what code below...

NavigateUrl='<%# "javascript:var PopUpWin =
window.open(""deletefiles.aspx?unc_path=" &
DataBinder.Eval(Container.DataItem,"unc_path") & "&username=" &
DataBinder.Eval(Container.DataItem, "username") &
""","""",""status=no,location=no,resizable=yes,wid th=400,height=150"")" %> '
ID="Hyperlink1"/>

Nov 18 '05 #2
Hello u_heet,

Keep in mind that the \ character is an escape character in javascript. To make this function properly, you probably need to replace \ with \\.

--
Matt Berther
http://www.mattberther.com
What I'm trying to do is when a hyperlink is clicked pass a value that
looks like \\Blah\blah\Blah to another .aspx page via a querystring.
But what the other page receives is \BlahblahBlah. I tried using
server.urlencode but I can't seem to get it to work. PLEASE HELP!
Here's what code below...

NavigateUrl='<%# "javascript:var PopUpWin =
window.open(""deletefiles.aspx?unc_path=" &
DataBinder.Eval(Container.DataItem,"unc_path") & "&username=" &
DataBinder.Eval(Container.DataItem, "username") &
""","""",""status=no,location=no,resizable=yes,wid th=400,height=150"")
" %> ' ID="Hyperlink1"/>


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Matt Howeson | last post by:
Some time ago I posted a request for help with a problem I was having sometime ago whereby a 404 error would result if any access to the Querystring had been made before the Context.Rewritepath is...
2
by: Hazzard | last post by:
I am trying to figure out how to add an additional value to a querystring collection so that when I click on a datagrid cell, there will be a key to distinguish it from another column's...
2
by: David Krussow | last post by:
I have three aspx pages that are displayed to the user in a frameset. One aspx page holds title information and displays in the top frame, the aspx page in the left frame lists products, and the...
3
by: Dan Sikorsky | last post by:
How can I get the Querystring passed to the Referring Page from its referrer? I don't want the querystring coming to my current page. I want the querystring that came to the referring page, so...
6
by: Joe | last post by:
Hello All: I have a webform (WebForm1.aspx) that retrieves a value from a database (_formSessionId) the first time that it is posted. After the user filles in the form, he/she clicks a Button...
8
by: tshad | last post by:
How do you check to see if there is no query string? I could have: 1) file.aspx 2) file.aspx?r=5&st=joe I need to know when there is no query string at all (1). Thanks,
4
by: EDOnLine | last post by:
We have a page which, after inserting a record ID to our database via stored proceedure, redirects the user to a URL on a thrid party site which as passed to that page via QueryString. In other...
9
by: VancouverMike | last post by:
Hi there, I run into a very strange problem. I got the following url and am passing information via query string. The problem when the "sin" key in query string is blank, shown as in the...
4
by: =?Utf-8?B?RVcgTmV3Ymll?= | last post by:
My apologies in advance if there is a better forum for this question. Given the following snippet: <script type="text/c#" runat="server"> protected void Page_Load(Object Sender, EventArgs e)...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.