If you need more information, I'd be glad to give it, but I am
developing an ASPX page so that the user can select multiple values for
a specific field, then pass them on (using Crystal Reports 10 on a
separate ASP page). Here is the code behind the button that will
launch the report (is in a file called StateSelect.aspx.vb:
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button2.Click
Server.Transfer("/NewCrystalReports/genericreport.asp", True)
End Sub
When I launch the ASP page and hit the submit button, I get the
following error in the IE window:
Server Error in '/NEWCrystalReports' Application.
--------------------------------------------------------------------------------
Error executing child request for /NewCrystalReports/genericreport.asp.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Error executing child
request for /NewCrystalReports/genericreport.asp.
Source Error:
Line 40:
Line 41: Protected Sub Button2_Click(ByVal sender As Object, ByVal
e As System.EventArgs) Handles Button2.Click
Line 42:
Server.Transfer("/NewCrystalReports/genericreport.asp", True)
Line 43: End Sub
Line 44: End Class
Source File: c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb
Line: 42
Stack Trace:
[HttpException (0x80004005): Error executing child request for
/NewCrystalReports/genericreport.asp.]
System.Web.HttpServerUtility.ExecuteInternal(IHttp Handler handler,
TextWriter writer, Boolean preserveForm, String path, String filePath,
String physPath, Exception error, String queryStringOverride) +3137343
System.Web.HttpServerUtility.Execute(String path, TextWriter writer,
Boolean preserveForm) +722
System.Web.HttpServerUtility.Transfer(String path, Boolean
preserveForm) +55
_Default.Button2_Click(Object sender, EventArgs e) in
c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb:42
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEven t(String
eventArgument) +78
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5670
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50215.44;
ASP.NET Version:2.0.50215.44
There is this line in the ASPX file itself:
<form method="post" id="form1" runat="server"
action="GenericReport.asp">
The server is running ASP.NET v2 (Windows 2003 Server with IIS 6) and I
am developing in VS .NET 2005. 8 1765
Brent,
I'm pretty certain that you can't server.transfer from a new ASP.NET
application back to an old ASP application. Server.Transfer will try to make
your ASP.NET application load the .asp page into it's runtime. That of
course can't happen since the code is foreign to it.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Brent White" <bw****@badgersportswear.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com... If you need more information, I'd be glad to give it, but I am developing an ASPX page so that the user can select multiple values for a specific field, then pass them on (using Crystal Reports 10 on a separate ASP page). Here is the code behind the button that will launch the report (is in a file called StateSelect.aspx.vb:
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Server.Transfer("/NewCrystalReports/genericreport.asp", True) End Sub
When I launch the ASP page and hit the submit button, I get the following error in the IE window:
Server Error in '/NEWCrystalReports' Application. --------------------------------------------------------------------------------
Error executing child request for /NewCrystalReports/genericreport.asp.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Error executing child request for /NewCrystalReports/genericreport.asp.
Source Error:
Line 40: Line 41: Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Line 42: Server.Transfer("/NewCrystalReports/genericreport.asp", True) Line 43: End Sub Line 44: End Class
Source File: c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb Line: 42
Stack Trace:
[HttpException (0x80004005): Error executing child request for /NewCrystalReports/genericreport.asp.] System.Web.HttpServerUtility.ExecuteInternal(IHttp Handler handler, TextWriter writer, Boolean preserveForm, String path, String filePath, String physPath, Exception error, String queryStringOverride) +3137343 System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) +722 System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm) +55 _Default.Button2_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb:42 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +78
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5670
-------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44
There is this line in the ASPX file itself:
<form method="post" id="form1" runat="server" action="GenericReport.asp">
The server is running ASP.NET v2 (Windows 2003 Server with IIS 6) and I am developing in VS .NET 2005.
How do I post to the existing ASP page from the ASP.NET page then?
"S. Justin Gengo" wrote: Brent,
I'm pretty certain that you can't server.transfer from a new ASP.NET application back to an old ASP application. Server.Transfer will try to
makeyour ASP.NET application load the .asp page into it's runtime. That of course can't happen since the code is foreign to it.
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Brent White" <bw****@badgersportswear.com> wrote in message news:11**********************@g14g2000cwa.googleg roups.com... If you need more information, I'd be glad to give it, but I am developing an ASPX page so that the user can select multiple values
for a specific field, then pass them on (using Crystal Reports 10 on a separate ASP page). Here is the code behind the button that will launch the report (is in a file called StateSelect.aspx.vb:
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Server.Transfer("/NewCrystalReports/genericreport.asp", True) End Sub
When I launch the ASP page and hit the submit button, I get the following error in the IE window:
Server Error in '/NEWCrystalReports' Application.
------------------------------------------------------------------------
-------- Error executing child request for
/NewCrystalReports/genericreport.asp. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Error executing child request for /NewCrystalReports/genericreport.asp.
Source Error:
Line 40: Line 41: Protected Sub Button2_Click(ByVal sender As Object,
ByVal e As System.EventArgs) Handles Button2.Click Line 42: Server.Transfer("/NewCrystalReports/genericreport.asp", True) Line 43: End Sub Line 44: End Class
Source File: c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb Line: 42
Stack Trace:
[HttpException (0x80004005): Error executing child request for /NewCrystalReports/genericreport.asp.] System.Web.HttpServerUtility.ExecuteInternal(IHttp Handler handler, TextWriter writer, Boolean preserveForm, String path, String
filePath, String physPath, Exception error, String queryStringOverride)
+3137343 System.Web.HttpServerUtility.Execute(String path, TextWriter
writer, Boolean preserveForm) +722 System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm) +55 _Default.Button2_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb:42 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +78
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.Rai
sePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5670
------------------------------------------------------------------------
-------- Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44
There is this line in the ASPX file itself:
<form method="post" id="form1" runat="server" action="GenericReport.asp">
The server is running ASP.NET v2 (Windows 2003 Server with IIS 6) and
I am developing in VS .NET 2005.
--
Sent via .NET Newsgroups http://www.dotnetnewsgroups.com
Response.Redirect
"Brent" wrote: How do I post to the existing ASP page from the ASP.NET page then?
"S. Justin Gengo" wrote:Brent,
I'm pretty certain that you can't server.transfer from a new ASP.NET application back to an old ASP application. Server.Transfer will try to makeyour ASP.NET application load the .asp page into it's runtime. That of course can't happen since the code is foreign to it.
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Brent White" <bw****@badgersportswear.com> wrote in message news:11**********************@g14g2000cwa.googleg roups.com... If you need more information, I'd be glad to give it, but I am developing an ASPX page so that the user can select multiple values for a specific field, then pass them on (using Crystal Reports 10 on a separate ASP page). Here is the code behind the button that will launch the report (is in a file called StateSelect.aspx.vb:
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Server.Transfer("/NewCrystalReports/genericreport.asp", True) End Sub
When I launch the ASP page and hit the submit button, I get the following error in the IE window:
Server Error in '/NEWCrystalReports' Application. ------------------------------------------------------------------------ -------- Error executing child request for /NewCrystalReports/genericreport.asp. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Error executing child request for /NewCrystalReports/genericreport.asp.
Source Error:
Line 40: Line 41: Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Line 42: Server.Transfer("/NewCrystalReports/genericreport.asp", True) Line 43: End Sub Line 44: End Class
Source File: c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb Line: 42
Stack Trace:
[HttpException (0x80004005): Error executing child request for /NewCrystalReports/genericreport.asp.] System.Web.HttpServerUtility.ExecuteInternal(IHttp Handler handler, TextWriter writer, Boolean preserveForm, String path, String filePath, String physPath, Exception error, String queryStringOverride) +3137343 System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) +722 System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm) +55 _Default.Button2_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb:42 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +78
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.Rai sePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5670
------------------------------------------------------------------------ -------- Version Information: Microsoft .NET Framework Version:2.0.50215.44; ASP.NET Version:2.0.50215.44
There is this line in the ASPX file itself:
<form method="post" id="form1" runat="server" action="GenericReport.asp">
The server is running ASP.NET v2 (Windows 2003 Server with IIS 6) and I am developing in VS .NET 2005.
-- Sent via .NET Newsgroups http://www.dotnetnewsgroups.com
Brent,
Yes, Sreejith is correct you need to use a Response.Redirect. And then
include the values you need to pass to the ASP page in the querystring.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Sreejith Ram" <Sr*********@discussions.microsoft.com> wrote in message
news:FD**********************************@microsof t.com... Response.Redirect
"Brent" wrote:
How do I post to the existing ASP page from the ASP.NET page then?
"S. Justin Gengo" wrote: >Brent, > >I'm pretty certain that you can't server.transfer from a new ASP.NET >application back to an old ASP application. Server.Transfer will try to make >your ASP.NET application load the .asp page into it's runtime. That of >course can't happen since the code is foreign to it. > >-- >Sincerely, > >S. Justin Gengo, MCP >Web Developer / Programmer > >www.aboutfortunate.com > >"Out of chaos comes order." > Nietzsche >"Brent White" <bw****@badgersportswear.com> wrote in message >news:11**********************@g14g2000cwa.googleg roups.com... >> If you need more information, I'd be glad to give it, but I am >> developing an ASPX page so that the user can select multiple values for >> a specific field, then pass them on (using Crystal Reports 10 on a >> separate ASP page). Here is the code behind the button that will >> launch the report (is in a file called StateSelect.aspx.vb: >> >> Protected Sub Button2_Click(ByVal sender As Object, ByVal e As >> System.EventArgs) Handles Button2.Click >> Server.Transfer("/NewCrystalReports/genericreport.asp", True) >> End Sub >> >> >> When I launch the ASP page and hit the submit button, I get the >> following error in the IE window: >> >> Server Error in '/NEWCrystalReports' Application. >> ------------------------------------------------------------------------ -------- >> >> Error executing child request for /NewCrystalReports/genericreport.asp. >> >> Description: An unhandled exception occurred during the execution of >> the current web request. Please review the stack trace for more >> information about the error and where it originated in the code. >> >> Exception Details: System.Web.HttpException: Error executing child >> request for /NewCrystalReports/genericreport.asp. >> >> Source Error: >> >> >> Line 40: >> Line 41: Protected Sub Button2_Click(ByVal sender As Object, ByVal >> e As System.EventArgs) Handles Button2.Click >> Line 42: >> Server.Transfer("/NewCrystalReports/genericreport.asp", True) >> Line 43: End Sub >> Line 44: End Class >> >> >> Source File: c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb >> Line: 42 >> >> Stack Trace: >> >> >> [HttpException (0x80004005): Error executing child request for >> /NewCrystalReports/genericreport.asp.] >> System.Web.HttpServerUtility.ExecuteInternal(IHttp Handler handler, >> TextWriter writer, Boolean preserveForm, String path, String filePath, >> String physPath, Exception error, String queryStringOverride) +3137343 >> System.Web.HttpServerUtility.Execute(String path, TextWriter writer, >> Boolean preserveForm) +722 >> System.Web.HttpServerUtility.Transfer(String path, Boolean >> preserveForm) +55 >> _Default.Button2_Click(Object sender, EventArgs e) in >> c:\inetpub\wwwroot\NEWCrystalReports\StateSelect.a spx.vb:42 >> System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 >> System.Web.UI.WebControls.Button.RaisePostBackEven t(String >> eventArgument) +78 >> >> System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.Rai sePostBackEvent(String >> eventArgument) +7 >> System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler >> sourceControl, String eventArgument) +11 >> System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) >> +33 >> System.Web.UI.Page.ProcessRequestMain(Boolean >> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) >> +5670 >> >> >> >> >> ------------------------------------------------------------------------ -------- >> Version Information: Microsoft .NET Framework Version:2.0.50215.44; >> ASP.NET Version:2.0.50215.44 >> >> >> >> >> >> There is this line in the ASPX file itself: >> >> <form method="post" id="form1" runat="server" >> action="GenericReport.asp"> >> >> >> >> >> >> The server is running ASP.NET v2 (Windows 2003 Server with IIS 6) and I >> am developing in VS .NET 2005. >> > > -- Sent via .NET Newsgroups http://www.dotnetnewsgroups.com
I don't suppose there's a way to pass the request parameters through
code instead of appending it to the URL, is there?
I ask because what I am passing is a filter selection for a Crystal 10
report that contains the States the report should be viewed for and the
report name itself (to lessen the number of ASP files I have to maintain
in the virtual directory), and that URL may be quite long and contain
some illegal characters.
--
Sent via .NET Newsgroups http://www.dotnetnewsgroups.com
Brent,
The only other thing I can think of is a bit lengthy, but you could put a
literal control onto a page and then use the HttpWebRequest object to post
to the page with the included parameters and then render the results to the
literal.
That would look something like this:
***Also a word of warning. It took me a while to get this working (sorry it
took so long to post back) because I kept getting 405 Method not allowed
errors from the site I was testing this code against. It turned out that the
server was refusing the posted data because I was using fake parameters. You
have to post with each and every paramter named exactly as the page is
expecting and go directly to the page or you'll get that error.
'---Create the request
Dim WebRequest As System.Net.WebRequest
WebRequest = System.Net.WebRequest.Create(New
Uri( http://www.mysite.com/mypage.asp))
'---Optionally set the timeout (if you don't the default timeout will be
used)
WebRequest.Timeout = 2000
'---Create the post data
Dim PostData As String = "id=" & HttpUtility.UrlEncode("1234") & "&state=" &
HttpUtility.UrlEncode("WI")
WebRequest.Method = "POST"
Dim PostBuffer() As Byte =
System.Text.Encoding.GetEncoding(1252).GetBytes(Po stData)
WebRequest.ContentLength = PostBuffer.Length
WebRequest.ContentType = "application/x-www-form-urlencoded"
Dim PostDataStream As System.IO.Stream = WebRequest.GetRequestStream()
PostDataStream.Write(PostBuffer, 0, PostBuffer.Length)
PostDataStream.Close()
'---Get the response produced by the request
Dim Response As System.Net.WebResponse = WebRequest.GetResponse
'---Download the page content into a stream
Dim Stream As System.IO.Stream = Response.GetResponseStream
'---Place the stream into a stream reader
Dim StreamReader As New System.IO.StreamReader(Stream)
'---Read the stream into a string object
Dim Html As String = StreamReader.ReadToEnd
'---Cleanup for the next request
Stream.Close()
StreamReader.Close()
'---Place the page found into the literal control
Literal1.Text = Html
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Brent" <bw****@badgersportswear.com> wrote in message
news:OQ****************@TK2MSFTNGP15.phx.gbl... I don't suppose there's a way to pass the request parameters through code instead of appending it to the URL, is there?
I ask because what I am passing is a filter selection for a Crystal 10 report that contains the States the report should be viewed for and the report name itself (to lessen the number of ASP files I have to maintain in the virtual directory), and that URL may be quite long and contain some illegal characters.
-- Sent via .NET Newsgroups http://www.dotnetnewsgroups.com
Another approach would be to create a table to hold the transaction data for
the report..
steps would be like this...
create a key value from asp.net page
save params for the report in the transaction table with the key , from
asp.net page
redirect to the asp page & pass the key using query string
read the parameters from asp page
delete the record in the transaction table for the key, from asp page..
What Justin suggested may be a better solution than this. if the crystal
report is being opened in the same window as asp page , would assigning the
response to literal work ? the Request.ContentType will need to be changed i
suppose. not sure..
"S. Justin Gengo" wrote: Brent,
The only other thing I can think of is a bit lengthy, but you could put a literal control onto a page and then use the HttpWebRequest object to post to the page with the included parameters and then render the results to the literal.
That would look something like this:
***Also a word of warning. It took me a while to get this working (sorry it took so long to post back) because I kept getting 405 Method not allowed errors from the site I was testing this code against. It turned out that the server was refusing the posted data because I was using fake parameters. You have to post with each and every paramter named exactly as the page is expecting and go directly to the page or you'll get that error.
'---Create the request Dim WebRequest As System.Net.WebRequest WebRequest = System.Net.WebRequest.Create(New Uri(http://www.mysite.com/mypage.asp))
'---Optionally set the timeout (if you don't the default timeout will be used) WebRequest.Timeout = 2000
'---Create the post data Dim PostData As String = "id=" & HttpUtility.UrlEncode("1234") & "&state=" & HttpUtility.UrlEncode("WI") WebRequest.Method = "POST"
Dim PostBuffer() As Byte = System.Text.Encoding.GetEncoding(1252).GetBytes(Po stData)
WebRequest.ContentLength = PostBuffer.Length WebRequest.ContentType = "application/x-www-form-urlencoded"
Dim PostDataStream As System.IO.Stream = WebRequest.GetRequestStream() PostDataStream.Write(PostBuffer, 0, PostBuffer.Length) PostDataStream.Close()
'---Get the response produced by the request Dim Response As System.Net.WebResponse = WebRequest.GetResponse
'---Download the page content into a stream Dim Stream As System.IO.Stream = Response.GetResponseStream
'---Place the stream into a stream reader Dim StreamReader As New System.IO.StreamReader(Stream)
'---Read the stream into a string object Dim Html As String = StreamReader.ReadToEnd
'---Cleanup for the next request Stream.Close() StreamReader.Close()
'---Place the page found into the literal control Literal1.Text = Html
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Brent" <bw****@badgersportswear.com> wrote in message news:OQ****************@TK2MSFTNGP15.phx.gbl...I don't suppose there's a way to pass the request parameters through code instead of appending it to the URL, is there?
I ask because what I am passing is a filter selection for a Crystal 10 report that contains the States the report should be viewed for and the report name itself (to lessen the number of ASP files I have to maintain in the virtual directory), and that URL may be quite long and contain some illegal characters.
-- Sent via .NET Newsgroups http://www.dotnetnewsgroups.com
Sreejith,
Good point. I was assuming that it's a web report. If it isn't then a
response.type coud be set to deliver the stream as a file.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Sreejith Ram" <Sr*********@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com... Another approach would be to create a table to hold the transaction data for the report..
steps would be like this...
create a key value from asp.net page save params for the report in the transaction table with the key , from asp.net page redirect to the asp page & pass the key using query string read the parameters from asp page delete the record in the transaction table for the key, from asp page..
What Justin suggested may be a better solution than this. if the crystal report is being opened in the same window as asp page , would assigning the response to literal work ? the Request.ContentType will need to be changed i suppose. not sure..
"S. Justin Gengo" wrote:
Brent,
The only other thing I can think of is a bit lengthy, but you could put a literal control onto a page and then use the HttpWebRequest object to post to the page with the included parameters and then render the results to the literal.
That would look something like this:
***Also a word of warning. It took me a while to get this working (sorry it took so long to post back) because I kept getting 405 Method not allowed errors from the site I was testing this code against. It turned out that the server was refusing the posted data because I was using fake parameters. You have to post with each and every paramter named exactly as the page is expecting and go directly to the page or you'll get that error.
'---Create the request Dim WebRequest As System.Net.WebRequest WebRequest = System.Net.WebRequest.Create(New Uri(http://www.mysite.com/mypage.asp))
'---Optionally set the timeout (if you don't the default timeout will be used) WebRequest.Timeout = 2000
'---Create the post data Dim PostData As String = "id=" & HttpUtility.UrlEncode("1234") & "&state=" & HttpUtility.UrlEncode("WI") WebRequest.Method = "POST"
Dim PostBuffer() As Byte = System.Text.Encoding.GetEncoding(1252).GetBytes(Po stData)
WebRequest.ContentLength = PostBuffer.Length WebRequest.ContentType = "application/x-www-form-urlencoded"
Dim PostDataStream As System.IO.Stream = WebRequest.GetRequestStream() PostDataStream.Write(PostBuffer, 0, PostBuffer.Length) PostDataStream.Close()
'---Get the response produced by the request Dim Response As System.Net.WebResponse = WebRequest.GetResponse
'---Download the page content into a stream Dim Stream As System.IO.Stream = Response.GetResponseStream
'---Place the stream into a stream reader Dim StreamReader As New System.IO.StreamReader(Stream)
'---Read the stream into a string object Dim Html As String = StreamReader.ReadToEnd
'---Cleanup for the next request Stream.Close() StreamReader.Close()
'---Place the page found into the literal control Literal1.Text = Html
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche "Brent" <bw****@badgersportswear.com> wrote in message news:OQ****************@TK2MSFTNGP15.phx.gbl... >I don't suppose there's a way to pass the request parameters through > code instead of appending it to the URL, is there? > > I ask because what I am passing is a filter selection for a Crystal 10 > report that contains the States the report should be viewed for and the > report name itself (to lessen the number of ASP files I have to > maintain > in the virtual directory), and that URL may be quite long and contain > some illegal characters. > > -- > Sent via .NET Newsgroups > http://www.dotnetnewsgroups.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mike420 |
last post by:
In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.
a. orbitz.com web site uses Lisp for algorithms, etc.
b....
|
by: Adam Lipscombe |
last post by:
Folks,
I need to get the contents of a form attribute.
In Read/Write mode this is field, so I can use getElementById("name").value
In ReadOnly this is just plain text, so I can use...
|
by: Richard Blewett [DevelopMentor] |
last post by:
I've just seen on Eric Gunnerson's blog that C# is getting Edit and Continue in Whidbey. That will please alot of people - although me, I have mixed feelings about it ;-)
...
|
by: hemant.singh |
last post by:
Hi all,
I am trying to get a way by which I'll know exactly when user goes out
of my site by clicking on close button in browser, So that w/e user
click close button in browser, I can send a...
|
by: WT |
last post by:
Hello,
Using VS2005.
I have an assembly library that can be called from a Web site asp.net
application or from a winform application.
From this library I need to retrieve a path using simply a...
|
by: Jim |
last post by:
Hi guys,
I have an object which represents an "item" in a CMS "component" where
an "item" in the most basic form just a field, and a "component" is
effectively a table.
"item" objects can be...
|
by: Sri |
last post by:
All
Recenetly our shop migrated to DB2 V8 from V7. We are in IBM System Level:
z/OS 1.6.1 @ RSU 0702.
Processor : IBM 2064-1C7 (z/900) # 1B89 Mode: 64-bit
One of my application is facing...
|
by: JamesB |
last post by:
I am writing a service that monitors when a particular app is started.
Works, but I need to get the user who is currently logged in, and of course
Environment.UserName returns the service logon...
|
by: SAL |
last post by:
Hello,
I'm working, basically my first, AJAX page and am having a few problems.
One is that the Click event for a button I have in UpdatePanel1 is not
getting called. I've tried with the button...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| | |