passing parameters using POST from an ASPX page to different page
-
hello, i want to pass parameters in a POST mode from a .NET page to other page. i heared about : Server.Transfer("xxx.asp",true); can i have guidelines on how to use it ? tnx in advance , avi
Server.Transfer("xxx.asp?paramname=paramvalue",true); and your xxx.aspx page_load event read parameter value like Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dim str as string=Request.QueryString("paramname") End Sub i thing is helpful :laugh:
-
Server.Transfer("xxx.asp?paramname=paramvalue",true); and your xxx.aspx page_load event read parameter value like Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load dim str as string=Request.QueryString("paramname") End Sub i thing is helpful :laugh:
This is true and probably sufficient for many cases, but be aware you are changing from POST to GET and then have the limitations of the querystring, such as: maximum of 2083 characters in the URI(This is IE, not sure for FF/Opera/other), and of course there are potentially security risks if you are sending any sensitive data it will be shown and can be easily altered by the end user. If you are trying a to re-post without relying on the querystring to a different page in your application there are probably workarounds (maybe by populating fields on an intermediate page, or manually building a response...then having one of them autopost to your ultimate target?) But I have never tried these before.