 |
|
|
Can you please add the source files so we can download some examples rather than retyping these methods ? thanks
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
One thing that you missed here is this;
Add following directive in the destination page's aspx so that SourcePage is accessable.
<%@ Reference Page="SendingPage.aspx" %>
Cheers... Ahmar
|
| Sign In·View Thread·PermaLink | 5.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
|
Would this be equally the same as request.form("field") like in old ASP? I was always use to not using any variables to save memory space.
Thanks!!!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Yes, It's exactly the same thing. I don't know if the author didn't know this, or he was just trying to explain another, more time consuming, way to do it.
It's not why you're running, it's where your going It's not what you're dreaming , but what you're going to do It's not where you're born, it's where you belong It's not how weak but what will make you strong
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Will this method of passing information to another page work the recieving page is pushed to a different server then the first page?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
Unless I'm mistaken, it should still work. Calling Server.Transfer method only means processing another page on the same server before sending back the rendered page to the client browser (one complete request-response cycle). In web farms, being pushed to different servers only occur between requests, not during processing of a request.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
Please help me to do this.I need to pass values between asp.net pages.Please help me with sample code.
|
| Sign In·View Thread·PermaLink | 3.00/5 (3 votes) |
|
|
|
 |
|
|
Hi,
From Page 1:
// Passing value from Page1 Response.Redirect("xyz.aspx?Namex=xyz");
From Page 2: // In xyz.aspx
// To retrieve the value from Page2
string strName= Request.QueryString["Namex"];
Babu A
|
| Sign In·View Thread·PermaLink | 2.67/5 (3 votes) |
|
|
|
 |
|
|
If you have a dropdownlist witch postbacks, Can I transfer the page to another frame on the page
|
| Sign In·View Thread·PermaLink | 2.00/5 (4 votes) |
|
|
|
 |
|
|
I get Type or namespace 'SourcePage' could not be found, can't find this object anywhere....??
|
| Sign In·View Thread·PermaLink | 3.63/5 (5 votes) |
|
|
|
 |
|
|
whoops posted too soon, it is the name of the calling page..
But I still get 'Specified cast is not valid.' when tring to load another page in an iframe, I guess you must use Server.Transfer to use this....
Oh well....
|
| Sign In·View Thread·PermaLink | 1.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
Nice job. But it's a good practice to wrap the code for the OnLoad event in your destination page inside a check for Page.IsPostBack. If the destination page does any kind of PostBack - the code as listed will fail because the context handler will change once the initial transfer has ended and the properties you are referencing will no longer be valid if a PostBack occurs (the new Context Handler will be the current page)
I also check the type of the context handler to make sure that the source page is really what I am expecting and that somebody didn't navigate to the destination page directly.
|
| Sign In·View Thread·PermaLink | 2.00/5 (3 votes) |
|
|
|
 |
|
|
yea Chili, you are right.Once the destination page refreshes or do a postback we can no longer retrives the data . Nice tip regards Ansil
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
It is difficult to do form post to another page with ASP.NET, but can be done. Transfer (along with Execute, part of classic ASP as well.) works only within the same site. When working on online store modules for my portal, I faced the same problem: need a button click on ASP.NET web form to do form post to PayPal for payment processing. Using Redirect with long QueryString is ugly. I came up with a server component, it looks as this for a button click handler,
private void PostButton_Click(object sender, EventArgs e) { Xrms.FormPost post = new Xrms.FormPost(); post.Url = "http://.../anotherPage.asp"; // add for variables: post.Add("VariableName_1", "VariableValue_1"); // ... more post.Add("VariableName_n", "VariableValue_n"); post.Post(); }
does a form post and browser redirect to another page, an ASP.NET page or anything else, either within the same site or out. A component as such should have been part of ASP.NET. There is more detail about this component on my site, www.xrmsystems.com
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
 |
|
|
DK,
Sorry I was not aware of your question in time.
My FormPost does form variables posting from all the values assigned on the server side, it does not do the normal enctype="multipart/form-data" file upload, which upload a file from the user browser side, with a file's path/name info in the input box. But it's possible if the user first upload file to the server with the button click, then have the server pass the file content over to another server. This could work, but would be slow.
If you what to upload a file content from the server side and the file is already on the server, and you also write the code for the final receiving end, you could conceivably base64-encode your binary data, post it over with the FormPost, on the receiving end, you can get back the binary data. You can post any binary data this way.
Moving large volume of data is slow, it's better if the user could upload directly to the final distination, one less hop is always better.
Jeff
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
We need more articles that begin like this: "For those ASP developers who are new to ASP.NET." I am in this boat and I appreciate the help making the transition.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
Well, on this article, I do have a question. How is .Net (or IIS) telling me what the setting were on the previous page, when I am now in the .aspx file of a new page? I am not clear on how this information is cached or where it is stored.
|
| Sign In·View Thread·PermaLink | 2.00/5 (1 vote) |
|
|
|
 |
|
|
MSDN about HttpServerUtility.Transfer Method : "Terminates execution of the current page and begins execution of a new page for the current request.". So it actually gives request u sent (with data) for process to another page. Information is stored in http request. Only guess
Never forget: "Stay kul and happy" (I.A.)
|
| Sign In·View Thread·PermaLink | 2.00/5 (2 votes) |
|
|
|
 |