473,386 Members | 1,786 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,386 software developers and data experts.

Server.Execute with parameters does not work

Hello.

I have an ASP.NET web application in which one page needs to execute another
page and retrieve it's results. The page to be called needs a couple
parameters passed in the URL. However, when I do this, the Server.Execute
fails. From tracing this is because the URL parameters are not properly
being accessed from the called page, so the functions in that page fail
because they are passed invalid parameters. I believe I am formatting my
Server.Execute function improperly. Any ideas? Thanks in advance.

HttpContext.Current.Server.Execute("~/Qstnr/SubmitQstnr.aspx?qId=2&sId=11",
pageResponse);

Ryan Taylor
Nov 18 '05 #1
2 2045
Server.Execute doesn't support query strings, it wants a path to the apx
file you want to create an instance of.

-- bruce (sqlwork.com)
"Ryan Taylor" <rt*****@stgeorgeconsulting.com> wrote in message
news:Ov**************@tk2msftngp13.phx.gbl...
Hello.

I have an ASP.NET web application in which one page needs to execute another page and retrieve it's results. The page to be called needs a couple
parameters passed in the URL. However, when I do this, the Server.Execute
fails. From tracing this is because the URL parameters are not properly
being accessed from the called page, so the functions in that page fail
because they are passed invalid parameters. I believe I am formatting my
Server.Execute function improperly. Any ideas? Thanks in advance.

HttpContext.Current.Server.Execute("~/Qstnr/SubmitQstnr.aspx?qId=2&sId=11", pageResponse);

Ryan Taylor

Nov 18 '05 #2
Yeah,

I ended up coming to this conclusion. Server.Execute seems to call the page
within the context of the page it is called in. As such, If the calling page
has the URL parameters that I wanted in the page to be called, then the
called page can retrieve those parameters from the calling page URL.

Thanks.

Ryan
Nov 18 '05 #3

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

Similar topics

3
by: Michael | last post by:
This one's really got me. I have a VB.NET (version 1.1.4322) project that provides an easy way to execute stored procedures on a generic level. When I run the code on computer A (running SQL...
4
by: paul dallaire | last post by:
HI! I want to execute a link witch is in JavaScript, How do we execute this in asp server side if possible? Basically I don't want anyone to see this link in the code view. this is the link...
6
by: fumanchu | last post by:
I've got to let end users (really just one person) load billing batch files into a third party app table. They need to specify the billing cycle name, the batch name, and the input file name and...
6
by: Jack | last post by:
I have the following asp script which I am trying to run against sql server. <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> <TITLE>Chapter 12 - Command...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
12
by: Light | last post by:
Hi all, I posted this question in the sqlserver.newusers group but I am not getting any response there so I am going to try it on the fine folks here:). I inherited some legacy ASP codes in my...
7
by: David | last post by:
i think i just realized i'm an idiot. again. (not syntactically correct code... just pieces to illustrate) class StateObject { members like socket, receiveBuffer, receiveBufferSize,...
1
by: Jez | last post by:
Can anyone help me with this ?? ASP on Windows 2003 filename = "file.asp?id=" & ID Server.Execute("filename") This doesn't work... Any ideas ? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.